Package dovecot implements functions to interact with Dovecot's authentication service.
In particular, it supports doing user authorization, and checking if a user exists. It is a very basic implementation, with only the minimum needed to cover chasquid's needs.
- type Auth
DefaultTimeout to use. We expect Dovecot to be quite fast, but don't want to hang forever if something gets stuck.
Auth represents a particular Dovecot auth service to use.
func Autodetect ¶
Autodetect where the dovecot authentication paths are, and return an Auth instance for them. If any of userdb or client are != "", they will be used and not autodetected.
NewAuth returns a new connection against Dovecot authentication service. It takes the addresses of userdb and client sockets (usually paths as configured in dovecot).
func (*Auth) Authenticate ¶
Authenticate returns true if the password is valid for the user, false otherwise.
Check to see if this auth is valid (but may not be working).
Exists returns true if the user exists, false otherwise.
Reload the authenticator. It's a no-op for dovecot, but it is needed to conform with the auth.Backend interface.