mirror of
https://github.com/FluuxIO/go-xmpp.git
synced 2025-10-22 20:45:35 -07: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
@@ -32,9 +32,9 @@ func sendxmpp(cmd *cobra.Command, args []string) {
|
||||
|
||||
var err error
|
||||
client, err := xmpp.NewClient(xmpp.Config{
|
||||
Jid: viper.GetString("jid"),
|
||||
Address: viper.GetString("addr"),
|
||||
Password: viper.GetString("password"),
|
||||
Jid: viper.GetString("jid"),
|
||||
Address: viper.GetString("addr"),
|
||||
Credential: xmpp.Password(viper.GetString("password")),
|
||||
}, xmpp.NewRouter())
|
||||
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user