Add implementation of xep-0070
This commit is contained in:
parent
da8d105154
commit
934c81ee39
|
|
@ -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"`
|
||||||
|
}
|
||||||
|
|
@ -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.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue