mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-17 06:52:59 +00:00
Avoid storing secrets and tokens at rest
- OAuth access tokens *are* APITokens. oauth_access_tokens table only stores extra oauth metadata. - only store hashed client_secret in database, using HashedCompare to allow comparison.
This commit is contained in:
@@ -148,7 +148,7 @@ class BaseHandler(RequestHandler):
|
||||
if orm_token is None:
|
||||
return None
|
||||
else:
|
||||
return orm_token.user or orm_token.service
|
||||
return orm_token.service or self._user_from_orm(orm_token.user)
|
||||
|
||||
def _user_for_cookie(self, cookie_name, cookie_value=None):
|
||||
"""Get the User for a given cookie, if there is one"""
|
||||
|
Reference in New Issue
Block a user