Add In-Band Registration support.

This commit is contained in:
Chteufleur 2016-09-15 09:33:54 +02:00
parent a52f910d62
commit eccf505942
1 changed files with 29 additions and 0 deletions

29
src/xmpp/register.go Normal file
View File

@ -0,0 +1,29 @@
package xmpp
import (
"encoding/xml"
)
const (
NSRegister = "jabber:iq:register"
)
// XEP-0077: In-Band Registration
type RegisterQuery struct {
XMLName xml.Name `xml:"jabber:iq:register query"`
Instructions string `xml:"instructions"`
Username string `xml:"username"`
Password string `xml:"password"`
XForm AdHocXForm `xml:"x"`
Registered *RegisterRegistered `xmp:"registered"`
Remove *RegisterRemove `xmp:"remove"`
}
type RegisterRegistered struct {
XMLName xml.Name `xml:"registered"`
}
type RegisterRemove struct {
XMLName xml.Name `xml:"remove"`
}