Documentation ¶
Overview ¶
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.
https://wiki.dovecot.org/Design/AuthProtocol https://wiki.dovecot.org/Services#auth
Index ¶
Constants ¶
const DefaultTimeout = 5 * time.Second
DefaultTimeout to use. We expect Dovecot to be quite fast, but don't want to hang forever if something gets stuck.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Auth ¶
type Auth struct { // Timeout for connection and I/O operations (applies on each call). // Set to DefaultTimeout by NewAuth. Timeout time.Duration // contains filtered or unexported fields }
Auth represents a particular Dovecot auth service to use.
func NewAuth ¶
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.