Revamp authenticate (#1025)
This commit is contained in:
1 parent
aa570f4e48
commit
6605b4c9f8
14 files changed
+276
-207
No files matched your search
@@ -30,14 +30,14 @@ func TestAuthenticationMulti(t *testing.T) {
|
||||
defer c2.Shutdown()
|
||||
|
||||
auth := authmethods.NewClient(c1.Client())
|
||||
token1Result, err := auth.Authenticate(c1.Context(), c1.Server().DevAuthMethodId, map[string]interface{}{"login_name": c1.Server().DevLoginName, "password": c1.Server().DevPassword})
|
||||
token1Result, err := auth.Authenticate(c1.Context(), c1.Server().DevAuthMethodId, "login", map[string]interface{}{"login_name": c1.Server().DevLoginName, "password": c1.Server().DevPassword})
|
||||
require.Nil(err)
|
||||
token1 := token1Result.Item
|
||||
require.NotNil(token1)
|
||||
|
||||
time.Sleep(5 * time.Second)
|
||||
auth = authmethods.NewClient(c2.Client())
|
||||
token2Result, err := auth.Authenticate(c2.Context(), c2.Server().DevAuthMethodId, map[string]interface{}{"login_name": c2.Server().DevLoginName, "password": c2.Server().DevPassword})
|
||||
token2Result, err := auth.Authenticate(c2.Context(), c2.Server().DevAuthMethodId, "login", map[string]interface{}{"login_name": c2.Server().DevLoginName, "password": c2.Server().DevPassword})
|
||||
require.Nil(err)
|
||||
token2 := token2Result.Item
|
||||
require.NotNil(token2)
|
||||
|
||||
Reference in new issue
Block a user