Documentation
¶
Index ¶
- type Authentication
- type AuthenticationType
- type FileAuth
- func (fileAuth *FileAuth) AddUser(username string, httpPassHash string, smtpPassHash string) error
- func (fileAuth *FileAuth) AuthFile(path string) int
- func (fileAuth *FileAuth) Authenticate(authType AuthenticationType, username string, password string) bool
- func (fileAuth *FileAuth) RequiresAuthentication() bool
- func (fileAuth *FileAuth) UsernamePresent(username string) bool
- func (fileAuth *FileAuth) WriteToFile(file *os.File) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authentication ¶
type Authentication interface {
// RequiresAuthentication check is supports auth
RequiresAuthentication() bool
// Authenticate check is credentials valid
Authenticate(authType AuthenticationType, username string, password string) bool
}
Authentication interface represents a backend flow to store or retrieve messages
type AuthenticationType ¶
type AuthenticationType = string
const ( HTTP AuthenticationType = "http" SMTP = "smtp" )
type FileAuth ¶
type FileAuth struct {
// contains filtered or unexported fields
}
FileAuth represents the authentication handler using file
func (*FileAuth) Authenticate ¶
func (fileAuth *FileAuth) Authenticate(authType AuthenticationType, username string, password string) bool
func (*FileAuth) RequiresAuthentication ¶
func (*FileAuth) UsernamePresent ¶
Click to show internal directories.
Click to hide internal directories.