Skip to content
Snippets Groups Projects
Commit 3025bb93 authored by Jonathan Villemaire-Krajden's avatar Jonathan Villemaire-Krajden
Browse files

use hub_auth property for hub_authenticated subproperties

parent 6c079b9f
No related branches found
No related tags found
No related merge requests found
......@@ -11,9 +11,9 @@ from tornado.web import RequestHandler, Application, authenticated
class AccessTokenHandler(HubAuthenticated, RequestHandler):
''' Respond to Access Token requests. '''
async def _request_token(self, username: str) -> str:
user_endpoint = f'{self.api_url}/users/{username}'
user_endpoint = f'{self.hub_auth.api_url}/users/{username}'
headers = {
'Authorization': f'token {self.api_token}',
'Authorization': f'token {self.hub_auth.api_token}',
}
with AsyncHTTPClient as client:
async with client.get(user_endpoint, headers=headers) as resp:
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment