mirror of
https://github.com/FluuxIO/go-xmpp.git
synced 2026-05-03 20:12:55 -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
@@ -111,8 +111,8 @@ func NewClient(config Config, r *Router) (c *Client, err error) {
|
||||
return nil, NewConnError(err, true)
|
||||
}
|
||||
|
||||
if config.Password == "" {
|
||||
err = errors.New("missing password")
|
||||
if config.Credential.secret == "" {
|
||||
err = errors.New("missing credential")
|
||||
return nil, NewConnError(err, true)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user