Skip to content

Commit

Permalink
Merge pull request #19514 from mvdbeek/stop_refresh_without_refresh_t…
Browse files Browse the repository at this point in the history
…oken

[24.2] Skip token refresh without refresh token in psa
  • Loading branch information
bgruening authored Feb 2, 2025
2 parents 382aac5 + 083ed71 commit d4b433b
Showing 1 changed file with 5 additions and 1 deletion.
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

0 comments on commit d4b433b

Please sign in to comment.