[FIX] notebookapp, auth: get_secure_cookie
kwargs
#3778
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Per Tornado's documentation:
With the current implementation in
auth/login.py
,this is possible to pass the
expires_days
optionbut not possible to enforce it as this is not possible
to pass
max_age_days
toget_secure_cookie
This makes impossible to set the cookie expiration without
using a custom
LoginHandler
.This revision is about adding the possibility to pass options
to Tornado's
get_secure_cookie
method,so it can be possible to set the cookies expiration,
among others.
In my opinion,
get_cookie_options
is a weird naming given the options to pass toset_secure_cookie
are calledcookie_options
. That said, I am not sure what is your policy regarding the retro-compatibility of the settings, ifcookie_options
can be renamedset_cookie_options
or not. Anyway we first have to discuss the feasibility of this change.