Package saslerr provides error conditions for the XMPP profile of SASL as defined by RFC 6120 §6.5.
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.
Failure represents a SASL error that is marshalable to XML.
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) 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).