Documentation
¶
Index ¶
- Constants
- func MongoPasswordDigest(username, password string) (string, error)
- func NewServerErrorResponse(conversationID int32, err error) (*message.Response, error)
- func NewServerErrorlResponse(conversationID int32, err error) (*message.Response, error)
- func NewServerFinalResponse(conversationID int32, payload []byte) (*message.Response, error)
- func NewServerFirstResponse(conversationID int32, payload []byte) (*message.Response, error)
- type Counter
- type SASLAuthenticators
- type SASLAuthzID
- type SASLChallenge
- type SASLCredential
- type SASLEmail
- type SASLGroup
- type SASLHashFunc
- type SASLIterationCount
- type SASLMechanism
- type SASLOption
- type SASLPassword
- type SASLPayload
- type SASLQuery
- type SASLRandomSequence
- type SASLSalt
- type SASLToken
- type SASLUsername
- type Server
Constants ¶
const ( SupportedMechs = "saslSupportedMechs" Start = "saslStart" Mechanism = "mechanism" Payload = "payload" AutoAuthorize = "autoAuthorize" Options = "options" SkipEmptyExchange = "skipEmptyExchange" Continue = "saslContinue" ConversationId = "conversationId" // nolint:stylecheck Done = "done" SpececulativAuthenticate = "speculativeAuthenticate" )
Variables ¶
This section is empty.
Functions ¶
func MongoPasswordDigest ¶ added in v1.2.1
SCRAM-SHA-1 Since: 3.0 SCRAM-SHA-1 is defined in RFC 5802. Page 11 of the RFC specifies that user names be prepared with SASLprep, but drivers MUST NOT do so. Page 8 of the RFC identifies the "SaltedPassword" as := Hi(Normalize(password), salt, i). The password variable MUST be the mongodb hashed variant. The mongo hashed variant is computed as hash = HEX( MD5( UTF8( username + ':mongo:' + plain_text_password ))), where plain_text_password is actually plain text. The username and password MUST NOT be prepared with SASLprep before hashing.
func NewServerErrorResponse ¶ added in v1.2.1
NewServerErrorResponse creates a new server error response.
func NewServerErrorlResponse ¶ added in v1.2.1
NewServerErrorlResponse creates a new server error response.
func NewServerFinalResponse ¶
NewServerFinalResponse creates a new server first response.
Types ¶
type Counter ¶
type Counter struct {
// contains filtered or unexported fields
}
Counter is a counter.
func NewCounterWith ¶
NewCounterWith returns a new counter with the specified count.
type SASLAuthenticators ¶ added in v1.2.1
type SASLAuthenticators = cred.Authenticators
Authenticators represents a list of credential authenticators.
type SASLAuthzID ¶ added in v1.2.1
AuthzID represents an authorization ID option.
type SASLChallenge ¶ added in v1.2.1
Challenge represents a challenge.
type SASLCredential ¶ added in v1.2.1
type SASLCredential = cred.Credential
SASLCredential represents a credential.
type SASLHashFunc ¶ added in v1.2.1
HashFunc represents a hash function.
type SASLIterationCount ¶ added in v1.2.1
type SASLIterationCount = sasl.IterationCount
IterationCount represents an iteration count.
type SASLMechanism ¶ added in v1.2.1
SASLMechanism represents a SASL mechanism.
type SASLOption ¶ added in v1.2.1
Option represents a SASL mechanism option.
type SASLPassword ¶ added in v1.2.1
Password represents a password option.
type SASLRandomSequence ¶ added in v1.2.1
type SASLRandomSequence = sasl.RandomSequence
HashFunc represents a hash function.
type SASLUsername ¶ added in v1.2.1
Username represents a username option.
type Server ¶
Server is a SASL server.
func (*Server) ConversationCounter ¶ added in v1.2.1
ConversationCounter returns a conversation counter.