Documentation ¶
Overview ¶
Package sasl implements the authentication protocol as used by salsauthd. saslauthd is part of the cyrus imap project: http://cyrusimap.org/
Index ¶
Constants ¶
const ( // MaxRequestLength is the maximum length allowed for login, password // service and realm MaxRequestLength = 256 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthCB ¶
AuthCB is the function signature of callbacks as used by the server to handle authentication requests.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client holds all information needed to send and authentication request as well as to receive responses from saslauthd compatible servers. Use NewClient to create the socket.
type Request ¶
Request contains all values for a saslauthd authentication request.
type Response ¶
Response holds the result as well as the message as returned by the authentication provider.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server holds all information needed to run the server. Use NewServer to create the struct.
func NewServer ¶
NewServer creates a server struct and starts listening on the unix socket as specified by socketpath. cb is the callback function which will get called for any authentication request.
func NewServerFromListener ¶
func NewServerFromListener(ln *net.UnixListener, cb AuthCB) (s *Server, err error)
NewServerFromListener creates a server struct using a UnixListener specified by ln. cb is the callback function which will get called for any authentication request.