File tree Expand file tree Collapse file tree 2 files changed +3
-7
lines changed
dask-gateway-server/dask_gateway_server Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Original file line number Diff line number Diff line change 2
2
import os
3
3
import time
4
4
import uuid
5
- from urllib .parse import quote
6
5
7
6
import aiohttp
8
7
from aiohttp import web
@@ -376,13 +375,10 @@ async def authenticate(self, request):
376
375
if token is None :
377
376
raise unauthorized ("jupyterhub" )
378
377
379
- url = "{}/authorizations/token/{}" .format (
380
- self .jupyterhub_api_url ,
381
- quote (token , safe = "" ),
382
- )
378
+ url = f"{ self .jupyterhub_api_url } /user"
383
379
384
380
kwargs = {
385
- "headers" : {"Authorization" : "token %s" % self . jupyterhub_api_token },
381
+ "headers" : {"Authorization" : f "token { token } " },
386
382
"ssl" : self .ssl_context ,
387
383
}
388
384
Original file line number Diff line number Diff line change @@ -117,7 +117,7 @@ def configure_dask_gateway(jhub_api_token, jhub_bind_url):
117
117
"dask_gateway_server.auth.JupyterHubAuthenticator"
118
118
)
119
119
config .JupyterHubAuthenticator .jupyterhub_api_token = jhub_api_token
120
- config .JupyterHubAuthenticator .jupyterhub_api_url = jhub_bind_url + "api/ "
120
+ config .JupyterHubAuthenticator .jupyterhub_api_url = jhub_bind_url + "api"
121
121
return config
122
122
123
123
You can’t perform that action at this time.
0 commit comments