Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrMechanismAlreadyRegistered indicates an attempt to register a duplicate mechanism ErrMechanismAlreadyRegistered = errors.New("the mechanism already registered") // ErrUnsupportedMechanism indicates an attempt to use an unregistered mechanism ErrUnsupportedMechanism = errors.New("the requested mechanism is not supported") // ErrUnsupportedProperty indicates an attempt to set a property unsupported by a mechanism ErrUnsupportedProperty = errors.New("unsupported property") )
var ( //ErrMissingParameter indicates a missing parameter from the server challenge ErrMissingParameter = errors.New("missing parameter in server challenge") )
var Stringprep = transform.Chain(nonASCIISpaceTransformer, mappedToNothing, norm.NFKC)
Stringprep implements Stringprep Profile for User Names and Passwords (RFC 4013) as a transform.Transformer
Functions ¶
func ClientSupport ¶
ClientSupport returns whether there is client-side support for a specified mechanism
func RegisterMechanism ¶
RegisterMechanism registers an SASL mechanism for a name
Types ¶
type AttributeValuePairs ¶
AttributeValuePairs represents atribute-value pairs
func ParseAttributeValuePairs ¶
func ParseAttributeValuePairs(src []byte) AttributeValuePairs
ParseAttributeValuePairs parses a string of comma-separated attribute=value pairs
type Mechanism ¶
type Mechanism interface {
NewClient() Session
}
Mechanism represents an SASL mechanism
type Properties ¶
Properties represents a map of property and value
type PropertyMissingError ¶
type PropertyMissingError struct {
Property
}
PropertyMissingError represents an error due a missing property
func (PropertyMissingError) Error ¶
func (e PropertyMissingError) Error() string
type Session ¶
type Session interface { SetProperty(Property, string) error Step(Token) (Token, error) NeedsMore() bool SetChannelBinding([]byte) }
Session represents an authorization session
type Token ¶
type Token []byte
Token represents a SASL token exchanged by client and server.
func DecodeToken ¶
DecodeToken decodes a base64 encoded token
Directories ¶
Path | Synopsis |
---|---|
Package digestmd5 implements the Digest Authentication as a SASL Mechanism according to RFC 2831.
|
Package digestmd5 implements the Digest Authentication as a SASL Mechanism according to RFC 2831. |
Package plain implements the Plain Simple Authentication Mechanism according to RFC 4616
|
Package plain implements the Plain Simple Authentication Mechanism according to RFC 4616 |
Package scram implements the Salted Challenge Response Authentication Mechanism according to RFC 5802 and RFC 7677.
|
Package scram implements the Salted Challenge Response Authentication Mechanism according to RFC 5802 and RFC 7677. |