2018-02-14 18:49:26 +01:00
|
|
|
package xmpp
|
2017-12-14 21:30:07 +01:00
|
|
|
|
2018-02-11 19:35:32 +01:00
|
|
|
import (
|
|
|
|
"encoding/xml"
|
|
|
|
)
|
|
|
|
|
2018-02-14 18:49:26 +01:00
|
|
|
// SASLMechanisms implements RFC 6120 - A.4 SASL Namespace
|
2018-02-11 19:35:32 +01:00
|
|
|
type SASLMechanisms struct {
|
|
|
|
XMLName xml.Name `xml:"urn:ietf:params:xml:ns:xmpp-sasl mechanisms"`
|
|
|
|
Mechanism []string `xml:"mechanism"`
|
|
|
|
}
|
2017-12-14 21:30:07 +01:00
|
|
|
|
2018-02-14 18:49:26 +01:00
|
|
|
// SASLAuth implements SASLAuth element
|
2017-12-14 21:30:07 +01:00
|
|
|
type SASLAuth struct {
|
|
|
|
XMLName xml.Name `xml:"urn:ietf:params:xml:ns:xmpp-sasl auth"`
|
|
|
|
Mechanism string `xml:"mechanism,attr"`
|
|
|
|
Body string `xml:",chardata"`
|
|
|
|
}
|
2018-02-07 19:32:11 +01:00
|
|
|
|
2018-02-14 18:49:26 +01:00
|
|
|
// SASLChallenge implements SASLChallenge element
|
2018-02-11 19:35:32 +01:00
|
|
|
type SASLChallenge struct {
|
|
|
|
XMLName xml.Name `xml:"urn:ietf:params:xml:ns:xmpp-sasl challenge"`
|
|
|
|
Body string `xml:",chardata"`
|
|
|
|
}
|
|
|
|
|
2018-02-14 18:49:26 +01:00
|
|
|
// SASLResponse implements SASLResponse element
|
2018-02-11 19:35:32 +01:00
|
|
|
type SASLResponse struct {
|
|
|
|
XMLName xml.Name `xml:"urn:ietf:params:xml:ns:xmpp-sasl response"`
|
|
|
|
Body string `xml:",chardata"`
|
|
|
|
}
|
|
|
|
|
2018-02-14 18:49:26 +01:00
|
|
|
// SASLSuccess implements SASLSuccess element
|
2018-02-11 19:35:32 +01:00
|
|
|
type SASLSuccess struct {
|
|
|
|
XMLName xml.Name `xml:"urn:ietf:params:xml:ns:xmpp-sasl success"`
|
|
|
|
Body string `xml:",chardata"`
|
|
|
|
}
|
|
|
|
|
2018-02-14 18:49:26 +01:00
|
|
|
// SASLAbout implements SASLAbout element
|
2018-02-11 19:35:32 +01:00
|
|
|
type SASLAbout struct {
|
|
|
|
XMLName xml.Name `xml:"urn:ietf:params:xml:ns:xmpp-sasl abort"`
|
|
|
|
}
|
|
|
|
|
2018-02-14 18:49:26 +01:00
|
|
|
// SASLFailure implements RFC 6120 - A.4 SASL Namespace
|
2018-02-11 19:35:32 +01:00
|
|
|
type SASLFailure struct {
|
|
|
|
XMLName xml.Name `xml:"urn:ietf:params:xml:ns:xmpp-sasl failure"`
|
|
|
|
|
|
|
|
Aborted *xml.Name `xml:"urn:ietf:params:xml:ns:xmpp-sasl aborted"`
|
|
|
|
AccountDisabled *xml.Name `xml:"urn:ietf:params:xml:ns:xmpp-sasl account-disabled"`
|
|
|
|
CredentialsExpired *xml.Name `xml:"urn:ietf:params:xml:ns:xmpp-sasl credentials-expired"`
|
|
|
|
EncryptionRequired *xml.Name `xml:"urn:ietf:params:xml:ns:xmpp-sasl encryption-required"`
|
|
|
|
IncorrectEncoding *xml.Name `xml:"urn:ietf:params:xml:ns:xmpp-sasl incorrect-encoding"`
|
|
|
|
InvalidAuthzid *xml.Name `xml:"urn:ietf:params:xml:ns:xmpp-sasl invalid-authzid"`
|
|
|
|
InvalidMechanism *xml.Name `xml:"urn:ietf:params:xml:ns:xmpp-sasl invalid-mechanism"`
|
|
|
|
MalformedRequest *xml.Name `xml:"urn:ietf:params:xml:ns:xmpp-sasl malformed-request"`
|
|
|
|
MechanismTooWeak *xml.Name `xml:"urn:ietf:params:xml:ns:xmpp-sasl mechanism-too-weak"`
|
|
|
|
NotAuthorized *xml.Name `xml:"urn:ietf:params:xml:ns:xmpp-sasl not-authorized"`
|
|
|
|
TemporaryAuthFailure *xml.Name `xml:"urn:ietf:params:xml:ns:xmpp-sasl temporary-auth-failure"`
|
|
|
|
|
2018-02-13 20:05:18 +01:00
|
|
|
Text *Text
|
2018-02-07 19:32:11 +01:00
|
|
|
}
|