mirror of
https://github.com/FluuxIO/go-xmpp.git
synced 2026-02-19 03:42:54 -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
@@ -25,7 +25,7 @@ func TestClient_Connect(t *testing.T) {
|
||||
mock.Start(t, testXMPPAddress, handlerConnectSuccess)
|
||||
|
||||
// Test / Check result
|
||||
config := Config{Address: testXMPPAddress, Jid: "test@localhost", Password: "test", Insecure: true}
|
||||
config := Config{Address: testXMPPAddress, Jid: "test@localhost", Credential: Password("test"), Insecure: true}
|
||||
|
||||
var client *Client
|
||||
var err error
|
||||
@@ -47,7 +47,7 @@ func TestClient_NoInsecure(t *testing.T) {
|
||||
mock.Start(t, testXMPPAddress, handlerAbortTLS)
|
||||
|
||||
// Test / Check result
|
||||
config := Config{Address: testXMPPAddress, Jid: "test@localhost", Password: "test"}
|
||||
config := Config{Address: testXMPPAddress, Jid: "test@localhost", Credential: Password("test")}
|
||||
|
||||
var client *Client
|
||||
var err error
|
||||
@@ -71,7 +71,7 @@ func TestClient_FeaturesTracking(t *testing.T) {
|
||||
mock.Start(t, testXMPPAddress, handlerAbortTLS)
|
||||
|
||||
// Test / Check result
|
||||
config := Config{Address: testXMPPAddress, Jid: "test@localhost", Password: "test"}
|
||||
config := Config{Address: testXMPPAddress, Jid: "test@localhost", Credential: Password("test")}
|
||||
|
||||
var client *Client
|
||||
var err error
|
||||
@@ -94,7 +94,7 @@ func TestClient_RFC3921Session(t *testing.T) {
|
||||
mock.Start(t, testXMPPAddress, handlerConnectWithSession)
|
||||
|
||||
// Test / Check result
|
||||
config := Config{Address: testXMPPAddress, Jid: "test@localhost", Password: "test", Insecure: true}
|
||||
config := Config{Address: testXMPPAddress, Jid: "test@localhost", Credential: Password("test"), Insecure: true}
|
||||
|
||||
var client *Client
|
||||
var err error
|
||||
|
||||
Reference in New Issue
Block a user