mirror of
https://github.com/FluuxIO/go-xmpp.git
synced 2026-03-06 02:23:06 -08:00
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
@@ -34,8 +34,8 @@ Here is an example code to configure a client to allow connecting to a server wi
|
||||
config := xmpp.Config{
|
||||
Address: "localhost:5222",
|
||||
Jid: "test@localhost",
|
||||
Password: "test",
|
||||
TLSConfig: tls.Config{InsecureSkipVerify: true},
|
||||
Credential: xmpp.Password("Test"),
|
||||
TLSConfig: tls.Config{InsecureSkipVerify: true},
|
||||
}
|
||||
```
|
||||
|
||||
@@ -96,7 +96,7 @@ func main() {
|
||||
config := xmpp.Config{
|
||||
Address: "localhost:5222",
|
||||
Jid: "test@localhost",
|
||||
Password: "test",
|
||||
Credential: xmpp.Password("Test"),
|
||||
StreamLogger: os.Stdout,
|
||||
Insecure: true,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user