Documentation ¶
Overview ¶
Package saslerr provides error conditions for the XMPP profile of SASL as defined by RFC 6120 §6.5.
Index ¶
Constants ¶
const ( Aborted condition = "aborted" AccountDisabled condition = "account-disabled" CredentialsExpired condition = "credentials-expired" EncryptionRequired condition = "encryption-required" IncorrectEncoding condition = "incorrect-encoding" InvalidAuthzID condition = "invalid-authzid" InvalidMechanism condition = "invalid-mechanism" MalformedRequest condition = "malformed-request" MechanismTooWeak condition = "mechanism-too-weak" NotAuthorized condition = "not-authorized" TemporaryAuthFailure condition = "temporary-auth-failure" )
Standard SASL error conditions.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Failure ¶
Failure represents a SASL error that is marshalable to XML.
func (Failure) Error ¶
Error satisfies the error interface for a Failure. It returns the text string if set, or the condition otherwise.
func (Failure) MarshalXML ¶
MarshalXML satisfies the xml.Marshaler interface for a Failure.
func (Failure) TokenReader ¶ added in v0.18.0
func (f Failure) TokenReader() xml.TokenReader
TokenReader implements the xmlstream.Marshaler interface.
func (*Failure) UnmarshalXML ¶
UnmarshalXML satisfies the xml.Unmarshaler interface for a Failure. If multiple text elements are present in the XML and the Failure struct already has a language tag set, UnmarshalXML selects the text element with an xml:lang attribute that most closely matches the features language tag. If no language tag is present, UnmarshalXML selects a text element with an xml:lang attribute of "und" if present, behavior is undefined otherwise (it will pick the tag that most closely matches "und", whatever that means).