mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-17 15:03:02 +00:00
add review comment changes
This commit is contained in:
@@ -114,11 +114,13 @@ class Authenticator(LoggingConfigurable):
|
|||||||
This forces :meth:`.refresh_user` to be called prior to stopping
|
This forces :meth:`.refresh_user` to be called prior to stopping
|
||||||
a server, to ensure that auth state is up-to-date.
|
a server, to ensure that auth state is up-to-date.
|
||||||
|
|
||||||
This can be important when e.g. auth tokens that may have expired
|
This can be important when e.g. auth tokens stored in auth_state may have expired,
|
||||||
are passed to the spawner via environment variables from auth_state.
|
but are a required part of the Spawner's shutdown steps.
|
||||||
|
|
||||||
If refresh_user cannot refresh the user auth data,
|
If refresh_user cannot refresh the user auth data,
|
||||||
stop will fail until the user logs in again.
|
stop will fail until the user logs in again.
|
||||||
|
|
||||||
|
.. versionadded:: 5.4
|
||||||
""",
|
""",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@@ -41,10 +41,8 @@ def refresh_pre_spawn(app):
|
|||||||
def refresh_pre_stop(app):
|
def refresh_pre_stop(app):
|
||||||
"""Fixture enabling auth refresh pre stop"""
|
"""Fixture enabling auth refresh pre stop"""
|
||||||
app.authenticator.refresh_pre_stop = True
|
app.authenticator.refresh_pre_stop = True
|
||||||
try:
|
yield
|
||||||
yield
|
app.authenticator.refresh_pre_stop = False
|
||||||
finally:
|
|
||||||
app.authenticator.refresh_pre_stop = False
|
|
||||||
|
|
||||||
|
|
||||||
async def test_auth_refresh_at_login(app, user):
|
async def test_auth_refresh_at_login(app, user):
|
||||||
|
Reference in New Issue
Block a user