Versions in this module Expand all Collapse all v0 v0.0.2 Mar 6, 2018 Changes in this version + const MongoDBX509 + type MongoDBX509Authenticator struct + User string + func (a *MongoDBX509Authenticator) Auth(ctx context.Context, c conn.Connection) error v0.0.1 Feb 13, 2018 Changes in this version + const GSSAPI + const MONGODBCR + const PLAIN + const SCRAMSHA1 + func ConductSaslConversation(ctx context.Context, c conn.Connection, db string, client SaslClient) error + func NewConnection(ctx context.Context, authenticator Authenticator, opener conn.Opener, ...) (conn.Connection, error) + func Opener(opener conn.Opener, authenticator Authenticator) conn.Opener + func RegisterAuthenticatorFactory(name string, factory AuthenticatorFactory) + type Authenticator interface + Auth func(context.Context, conn.Connection) error + func CreateAuthenticator(name string, cred *Cred) (Authenticator, error) + type AuthenticatorFactory func(cred *Cred) (Authenticator, error) + type Cred struct + Password string + PasswordSet bool + Props map[string]string + Source string + Username string + type DefaultAuthenticator struct + Cred *Cred + func (a *DefaultAuthenticator) Auth(ctx context.Context, c conn.Connection) error + type Error struct + func (e *Error) Error() string + func (e *Error) Inner() error + func (e *Error) Message() string + type MongoDBCRAuthenticator struct + DB string + Password string + Username string + func (a *MongoDBCRAuthenticator) Auth(ctx context.Context, c conn.Connection) error + type PlainAuthenticator struct + Password string + Username string + func (a *PlainAuthenticator) Auth(ctx context.Context, c conn.Connection) error + type SaslClient interface + Completed func() bool + Next func(challenge []byte) ([]byte, error) + Start func() (string, []byte, error) + type SaslClientCloser interface + Close func() + type ScramSHA1Authenticator struct + DB string + NonceGenerator func([]byte) error + Password string + Username string + func (a *ScramSHA1Authenticator) Auth(ctx context.Context, c conn.Connection) error