mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-11 03:52:59 +00:00
set cookie on singleuser when authenticated with ?token=...
Allows `/user/name?token=...` URL to login users for more than one request. matches token behavior of regular notebook server.
This commit is contained in:
@@ -731,6 +731,11 @@ class HubAuthenticated(object):
|
||||
except Exception:
|
||||
self._hub_auth_user_cache = None
|
||||
raise
|
||||
token = self.get_argument('token', '')
|
||||
if user_model and token and getattr(self, '_token_authenticated', False):
|
||||
# authenticated via `?token=`
|
||||
# set a cookie for future requests
|
||||
self.hub_auth.set_cookie(self, token)
|
||||
return self._hub_auth_user_cache
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user