Skip to content

Commit

Permalink
Add check for tokenRefreshed in JWTFilter
Browse files Browse the repository at this point in the history
Fix related unit test as well.
  • Loading branch information
Gcolon021 committed Jul 26, 2024
1 parent 339a407 commit 149629f
Show file tree
Hide file tree
Showing 2 changed files with 245 additions and 258 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ private AuthUser callTokenIntroEndpoint(ContainerRequestContext requestContext,
throw new NotAuthorizedException("Token invalid or expired");
}

if (responseContent.get("tokenRefreshed").asBoolean()) {
if (responseContent.has("tokenRefreshed") && responseContent.get("tokenRefreshed").asBoolean()) {
requestContext.setProperty("refreshedToken", responseContent.get("token"));
}

Expand Down
Loading

0 comments on commit 149629f

Please sign in to comment.