strip access tokens for ease of use
This commit is contained in:
parent
f709bed0e9
commit
94a8b53f28
|
@ -27,8 +27,8 @@ class LoginFailed(Exception):
|
|||
class Pleroma:
|
||||
def __init__(self, *, api_base_url, access_token):
|
||||
self.api_base_url = api_base_url.rstrip('/')
|
||||
self.access_token = access_token
|
||||
self._session = http_session_factory({'Authorization': 'Bearer ' + access_token})
|
||||
self.access_token = access_token.strip()
|
||||
self._session = http_session_factory({'Authorization': 'Bearer ' + self.access_token})
|
||||
self._logged_in_id = None
|
||||
|
||||
async def __aenter__(self):
|
||||
|
|
Loading…
Reference in New Issue