Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrSASLIncorrectEncoding represents a 'incorrect-encoding' authentication error. ErrSASLIncorrectEncoding = newSASLError("incorrect-encoding") // ErrSASLMalformedRequest represents a 'malformed-request' authentication error. ErrSASLMalformedRequest = newSASLError("malformed-request") // ErrSASLNotAuthorized represents a 'not-authorized' authentication error. ErrSASLNotAuthorized = newSASLError("not-authorized") // ErrSASLTemporaryAuthFailure represents a 'temporary-auth-failure' authentication error. ErrSASLTemporaryAuthFailure = newSASLError("temporary-auth-failure") )
Functions ¶
This section is empty.
Types ¶
type Authenticator ¶
type Authenticator interface { // Mechanism returns authenticator mechanism name. Mechanism() string // Username returns authenticated username in case // authentication process has been completed. Username() string // Authenticated returns whether or not user has been authenticated. Authenticated() bool // UsesChannelBinding returns whether or not this authenticator // requires channel binding bytes. UsesChannelBinding() bool // ProcessElement process an incoming authenticator element. ProcessElement(xmpp.XElement) error // Reset resets authenticator internal state. Reset() }
Authenticator defines a generic authenticator state machine.
type DigestMD5 ¶
type DigestMD5 struct {
// contains filtered or unexported fields
}
DigestMD5 represents a DIGEST-MD5 authenticator.
func NewDigestMD5 ¶
NewDigestMD5 returns a new digest-md5 authenticator instance.
func (*DigestMD5) Authenticated ¶
Authenticated returns whether or not user has been authenticated.
func (*DigestMD5) ProcessElement ¶
ProcessElement process an incoming authenticator element.
func (*DigestMD5) Reset ¶
func (d *DigestMD5) Reset()
Reset resets digest-md5 authenticator internal state.
func (*DigestMD5) Username ¶
Username returns authenticated username in case authentication process has been completed.
func (*DigestMD5) UsesChannelBinding ¶
UsesChannelBinding returns whether or not digest-md5 authenticator requires channel binding bytes.
type Plain ¶
type Plain struct {
// contains filtered or unexported fields
}
Plain represents a PLAIN authenticator.
func (*Plain) Authenticated ¶
Authenticated returns whether or not user has been authenticated.
func (*Plain) ProcessElement ¶
ProcessElement process an incoming authenticator element.
func (*Plain) Username ¶
Username returns authenticated username in case authentication process has been completed.
func (*Plain) UsesChannelBinding ¶
UsesChannelBinding returns whether or not plain authenticator requires channel binding bytes.
type SASLError ¶
type SASLError struct {
// contains filtered or unexported fields
}
SASLError represents specific SASL error type.
type Scram ¶
type Scram struct {
// contains filtered or unexported fields
}
Scram represents a SCRAM authenticator.
func NewScram ¶
func NewScram(stm stream.C2S, tr transport.Transport, scramType ScramType, usesChannelBinding bool) *Scram
NewScram returns a new scram authenticator instance.
func (*Scram) Authenticated ¶
Authenticated returns whether or not user has been authenticated.
func (*Scram) ProcessElement ¶
ProcessElement process an incoming authenticator element.
func (*Scram) Username ¶
Username returns authenticated username in case authentication process has been completed.
func (*Scram) UsesChannelBinding ¶
UsesChannelBinding returns whether or not scram authenticator requires channel binding bytes.