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 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
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 ¶
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 ¶
NewServerErrorResponse creates a new server error response.
func NewServerErrorlResponse ¶
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 SASLIterationCount ¶
type SASLIterationCount = sasl.IterationCount
IterationCount represents an iteration count.
type SASLRandomSequence ¶
type SASLRandomSequence = sasl.RandomSequence
HashFunc represents a hash function.