Versions in this module Expand all Collapse all v1 v1.4.1 Sep 27, 2020 Changes in this version + const GSSAPI + const MONGODBCR + const MongoDBX509 + const PLAIN + const SCRAMSHA1 + const SCRAMSHA256 + func ConductSaslConversation(ctx context.Context, conn driver.Connection, db string, client SaslClient) error + func Handshaker(h driver.Handshaker, options *HandshakeOptions) driver.Handshaker + func RegisterAuthenticatorFactory(name string, factory AuthenticatorFactory) + type Authenticator interface + Auth func(context.Context, description.Server, driver.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, desc description.Server, conn driver.Connection) error + type Error struct + func (e *Error) Error() string + func (e *Error) Inner() error + func (e *Error) Message() string + type HandshakeOptions struct + AppName string + Authenticator Authenticator + Compressors []string + DBUser string + PerformAuthentication func(description.Server) bool + type MongoDBCRAuthenticator struct + DB string + Password string + Username string + func (a *MongoDBCRAuthenticator) Auth(ctx context.Context, _ description.Server, conn driver.Connection) error + type MongoDBX509Authenticator struct + User string + func (a *MongoDBX509Authenticator) Auth(ctx context.Context, desc description.Server, conn driver.Connection) error + type PlainAuthenticator struct + Password string + Username string + func (a *PlainAuthenticator) Auth(ctx context.Context, _ description.Server, conn driver.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 ScramAuthenticator struct + func (a *ScramAuthenticator) Auth(ctx context.Context, _ description.Server, conn driver.Connection) error