forked from jshiffer/go-xmpp
Introduce Credential structure to define auth type
For now we are planning to support Password and OAuthToken. In the future, we would like to add certificate-based authentication.
This commit is contained in:

committed by
Mickaël Rémond

parent
3b66e31888
commit
9c8353d081
@@ -17,7 +17,7 @@ func main() {
|
||||
config := xmpp.Config{
|
||||
Address: "localhost:5222",
|
||||
Jid: "test@localhost",
|
||||
Password: "test",
|
||||
Credential: xmpp.Password("test"),
|
||||
StreamLogger: os.Stdout,
|
||||
Insecure: true,
|
||||
// TLSConfig: tls.Config{InsecureSkipVerify: true},
|
||||
|
@@ -32,9 +32,9 @@ func main() {
|
||||
|
||||
// 2. Prepare XMPP client
|
||||
config := xmpp.Config{
|
||||
Address: *address,
|
||||
Jid: *jid,
|
||||
Password: *password,
|
||||
Address: *address,
|
||||
Jid: *jid,
|
||||
Credential: xmpp.Password(*password),
|
||||
// StreamLogger: os.Stdout,
|
||||
Insecure: true,
|
||||
}
|
||||
|
Reference in New Issue
Block a user