Skip to content

Commit

Permalink
Update: Add get_authorization method #32
Browse files Browse the repository at this point in the history
  • Loading branch information
Alma-field committed Oct 16, 2021
1 parent dd016a5 commit 6ccdd36
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions twitcaspy/auth/oauth/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,6 @@ def __init__(self, client_id, client_secret):
def __call__(self, request):
request.headers['Authorization'] = 'Basic ' + self.token
return request

def get_authorization(self):
return f'Basic {self.token}'
3 changes: 3 additions & 0 deletions twitcaspy/auth/oauth/bearer.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,6 @@ def __init__(self, bearer_token):
def __call__(self, request):
request.headers['Authorization'] = f'Bearer {self.bearer_token}'
return request

def get_authorization(self):
return f'Bearer {self.bearer_token}'

0 comments on commit 6ccdd36

Please sign in to comment.