Skip to content

Commit

Permalink
fix: Fix encryption key in OAuth2 class
Browse files Browse the repository at this point in the history
  • Loading branch information
jjjermiah committed Feb 6, 2024
1 parent 2972b5f commit 1082e47
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/nbiatoolkit/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def __init__(
self._fernet_key: bytes = Fernet.generate_key()
self.username: str
self.password: str
self.username, self.password = encrypt_credentials(key=self.fernet_key, username=username, password=password)
self.username, self.password = encrypt_credentials(key=self._fernet_key, username=username, password=password)

if isinstance(base_url, NBIA_ENDPOINTS):
self.base_url = base_url.value
Expand All @@ -125,10 +125,6 @@ def __init__(
self.scope = None


@property
def fernet_key(self) -> bytes:
return self._fernet_key

def is_logged_out(self) -> bool:
return (self._access_token is "" and self.username == "" and self.password == "" and self.client_id == "" and self.base_url == "")

Expand Down

0 comments on commit 1082e47

Please sign in to comment.