add review comment changes

This commit is contained in:
Tim Kreuzer
2025-07-04 06:17:43 +00:00
parent e3b704b83e
commit 0e44693819
2 changed files with 6 additions and 6 deletions

View File

@@ -114,11 +114,13 @@ class Authenticator(LoggingConfigurable):
This forces :meth:`.refresh_user` to be called prior to stopping
a server, to ensure that auth state is up-to-date.
This can be important when e.g. auth tokens that may have expired
are passed to the spawner via environment variables from auth_state.
This can be important when e.g. auth tokens stored in auth_state may have expired,
but are a required part of the Spawner's shutdown steps.
If refresh_user cannot refresh the user auth data,
stop will fail until the user logs in again.
.. versionadded:: 5.4
""",
)

View File

@@ -41,10 +41,8 @@ def refresh_pre_spawn(app):
def refresh_pre_stop(app):
"""Fixture enabling auth refresh pre stop"""
app.authenticator.refresh_pre_stop = True
try:
yield
finally:
app.authenticator.refresh_pre_stop = False
yield
app.authenticator.refresh_pre_stop = False
async def test_auth_refresh_at_login(app, user):