diff --git a/pwclient/api.py b/pwclient/api.py index fcd3673..427395b 100644 --- a/pwclient/api.py +++ b/pwclient/api.py @@ -457,9 +457,8 @@ def _generate_headers(self, additional_headers=None): } if self._token: - pass - - if self._username: + headers['Authorization'] = f"Token {self._token}" + elif self._username and self._password: credentials = base64.b64encode( f'{self._username}:{self._password}'.encode('ascii') ).decode('ascii')