Skip to content
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

[24.2] Skip token refresh without refresh token in psa #19514

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion lib/galaxy/authnz/psa_authnz.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,11 @@ def refresh_azure(self, user_authnz_token):
user_authnz_token.set_extra_data(extra_data)

def refresh(self, trans, user_authnz_token):
if not user_authnz_token or not user_authnz_token.extra_data:
if (
not user_authnz_token
or not user_authnz_token.extra_data
or "refresh_token" not in user_authnz_token.extra_data
):
return False
# refresh tokens if they reached their half lifetime
if "expires" in user_authnz_token.extra_data:
Expand Down
Loading