mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-17 06:52:59 +00:00
add session_id to token model
This commit is contained in:
@@ -58,6 +58,14 @@ class SelfAPIHandler(APIHandler):
|
||||
|
||||
model = get_model(user)
|
||||
|
||||
# add session_id associated with token
|
||||
# added in 2.0
|
||||
token = self.get_token()
|
||||
if token:
|
||||
model["session_id"] = token.session_id
|
||||
else:
|
||||
model["session_id"] = None
|
||||
|
||||
# add scopes to identify model,
|
||||
# but not the scopes we added to ensure we could read our own model
|
||||
model["scopes"] = sorted(self.expanded_scopes.difference(_added_scopes))
|
||||
|
Reference in New Issue
Block a user