Skip to content

Commit

Permalink
added strip to authentication headers
Browse files Browse the repository at this point in the history
  • Loading branch information
MKLepium committed Nov 21, 2023
1 parent 6a6ab76 commit cd9d711
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/hsfs/client/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class BearerAuth(requests.auth.AuthBase):
"""Class to encapsulate a Bearer token."""

def __init__(self, token):
self._token = token
self._token = token.strip()

def __call__(self, r):
r.headers["Authorization"] = "Bearer " + self._token
Expand All @@ -32,7 +32,7 @@ class ApiKeyAuth(requests.auth.AuthBase):
"""Class to encapsulate an API key."""

def __init__(self, token):
self._token = token
self._token = token.strip()

def __call__(self, r):
r.headers["Authorization"] = "ApiKey " + self._token
Expand Down

0 comments on commit cd9d711

Please sign in to comment.