Add implementation of xep-0070

This commit is contained in:
Chteufleur 2016-06-20 21:28:11 +02:00
parent da8d105154
commit 934c81ee39
2 changed files with 21 additions and 0 deletions

18
src/xmpp/httpAuth.go Normal file
View File

@ -0,0 +1,18 @@
package xmpp
import (
"encoding/xml"
)
const (
NSHTTPAuth = "http://jabber.org/protocol/http-auth"
)
// XEP-0070: Verifying HTTP Requests via XMPP
type Confirm struct {
XMLName xml.Name `xml:"http://jabber.org/protocol/http-auth confirm"`
Id string `xml:"id,attr"`
Method string `xml:"method,attr"`
URL string `xml:"url,attr"`
}

View File

@ -70,6 +70,9 @@ type Message struct {
From string `xml:"from,attr,omitempty"` From string `xml:"from,attr,omitempty"`
Subject string `xml:"subject,omitempty"` Subject string `xml:"subject,omitempty"`
Body string `xml:"body,omitempty"` Body string `xml:"body,omitempty"`
Thread string `xml:"thread,omitempty"`
Error *Error `xml:"error"`
Confir *Confirm `xml:"confirm"`
} }
// XMPP <presence/> stanza. // XMPP <presence/> stanza.