diff --git a/integration/test_authentication.py b/integration/test_authentication.py index f53a3a471..697973653 100644 --- a/integration/test_authentication.py +++ b/integration/test_authentication.py @@ -106,7 +106,6 @@ def test_authentication_client_credentials( "some_scope offline_access", False, ), - ("okta - default scope", "test@test.de", "OKTA_DUMMY_CI_PW", OKTA_PORT_USERS, None, False), ( "okta - no refresh", "test@test.de", diff --git a/mock_tests/test_auth.py b/mock_tests/test_auth.py index ff20fa0f2..a22c7bda5 100644 --- a/mock_tests/test_auth.py +++ b/mock_tests/test_auth.py @@ -20,12 +20,11 @@ def test_user_password(weaviate_auth_mock): user = "AUsername" pw = "SomePassWord" - scopes = "offline_access" # note: order matters. If this handler is not called, check of the order of arguments changed weaviate_auth_mock.expect_request( "/auth", - data=f"grant_type=password&username={user}&password={pw}&scope={scopes}&client_id={CLIENT_ID}", + data=f"grant_type=password&username={user}&password={pw}&client_id={CLIENT_ID}", ).respond_with_json( {"access_token": ACCESS_TOKEN, "expires_in": 500, "refresh_token": REFRESH_TOKEN} ) diff --git a/weaviate/auth.py b/weaviate/auth.py index d11a9e59b..99cb34ed2 100644 --- a/weaviate/auth.py +++ b/weaviate/auth.py @@ -1,7 +1,7 @@ """ Authentication class definitions. """ -from dataclasses import dataclass, field +from dataclasses import dataclass from typing import Optional, Union, List from weaviate.warnings import _Warnings @@ -46,7 +46,7 @@ class AuthClientPassword: username: str password: str - scope: Optional[SCOPES] = field(default_factory=lambda: ["offline_access"]) + scope: Optional[SCOPES] = None def __post_init__(self) -> None: if self.scope is None: