Skip to content

Commit

Permalink
feat: fix authenticate with token mechanism (#330)
Browse files Browse the repository at this point in the history
  • Loading branch information
gjedlicska authored Feb 26, 2024
1 parent 7812393 commit 1b59f0b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/specklepy/core/api/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,7 @@ def authenticate(self, token: str) -> None:
Arguments:
token {str} -- an api token
"""
self.authenticate_with_token(token)
self._set_up_client()
self.authenticate_with_account(get_account_from_token(token))

def authenticate_with_token(self, token: str) -> None:
"""
Expand All @@ -135,7 +134,7 @@ def authenticate_with_token(self, token: str) -> None:
Arguments:
token {str} -- an api token
"""
self.account = get_account_from_token(token, self.url)
self.account = Account.from_token(token, self.url)
self._set_up_client()

def authenticate_with_account(self, account: Account) -> None:
Expand Down

0 comments on commit 1b59f0b

Please sign in to comment.