-
Notifications
You must be signed in to change notification settings - Fork 324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should get_secure_cookie set token_authenticated property? #566
Comments
This docstring seems explanatory of intent: jupyter_server/jupyter_server/auth/login.py Lines 146 to 154 in 40c477b
|
So if no one is complaining about the current behavior I would argue for leaving |
For the branch where the comment were made: jupyter_server/jupyter_server/auth/login.py Lines 172 to 176 in f914126
I don't think we can assume that the source of the secure cookie is always from a token? Or am I missing something? |
Thanks all for looking into this and your comments, I have convinced myself the answer to this question is no, please close this issue. The root cause for raising this was handling the difference between hub and token authentication. With "hubless" token authentication
With hub authentication
The "name" field is relevant to hubless authentication, the "server" field might be, once we have authorisation in the "kind" and "groups" fields might be relevant too. We could potentially smooth over the difference by returning a dict in these circumstances something like: return {
'kind': 'user',
'user': getpass.getuser()
} |
Thank you for further investigating this, @oliver-sanders. Closing this for now, but I'm guessing we will revisit this further as we move to make the server more multi-user. |
Should this branch set
handler._token_authenticated = True
.Technically it is "cookie authenticated", however, the cookie is based on an earlier token.
I ask because it can be useful for a handler to know when token authorisation is in use, for example:
Originally posted by @oliver-sanders in #562 (comment)
The text was updated successfully, but these errors were encountered: