sasl

package
v1.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 28, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
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

func MongoPasswordDigest(username, password string) (string, error)

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

func NewServerErrorResponse(conversationID int32, err error) (*message.Response, error)

NewServerErrorResponse creates a new server error response.

func NewServerErrorlResponse

func NewServerErrorlResponse(conversationID int32, err error) (*message.Response, error)

NewServerErrorlResponse creates a new server error response.

func NewServerFinalResponse

func NewServerFinalResponse(conversationID int32, payload []byte) (*message.Response, error)

NewServerFinalResponse creates a new server first response.

func NewServerFirstResponse

func NewServerFirstResponse(conversationID int32, payload []byte) (*message.Response, error)

NewServerFirstResponse creates a new server first response.

Types

type Counter

type Counter struct {
	// contains filtered or unexported fields
}

Counter is a counter.

func NewCounter

func NewCounter() *Counter

NewCounter returns a new counter.

func NewCounterWith

func NewCounterWith(count int32) *Counter

NewCounterWith returns a new counter with the specified count.

func (*Counter) Inc

func (counter *Counter) Inc() int32

Inc increments the counter and returns the new value.

type SASLAuthzID

type SASLAuthzID = sasl.AuthzID

AuthzID represents an authorization ID option.

type SASLChallenge

type SASLChallenge = sasl.Challenge

Challenge represents a challenge.

type SASLCredential

type SASLCredential = auth.Credential

SASLCredential represents a credential.

type SASLEmail

type SASLEmail = sasl.Email

Email represents an email.

type SASLGroup

type SASLGroup = sasl.Group

Group represents a group option.

type SASLHashFunc

type SASLHashFunc = sasl.HashFunc

HashFunc represents a hash function.

type SASLIterationCount

type SASLIterationCount = sasl.IterationCount

IterationCount represents an iteration count.

type SASLMechanism

type SASLMechanism = sasl.Mechanism

SASLMechanism represents a SASL mechanism.

type SASLOption

type SASLOption = sasl.Option

Option represents a SASL mechanism option.

type SASLPassword

type SASLPassword = sasl.Password

Password represents a password option.

type SASLPayload

type SASLPayload = sasl.Payload

Payload represents a payload.

type SASLQuery

type SASLQuery = auth.Query

SASLQuery represents a query.

type SASLRandomSequence

type SASLRandomSequence = sasl.RandomSequence

HashFunc represents a hash function.

type SASLSalt

type SASLSalt = sasl.Salt

Salt represents a salt.

type SASLToken

type SASLToken = sasl.Token

Token represents a token.

type SASLUsername

type SASLUsername = sasl.Username

Username represents a username option.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL