Skip to content

Commit

Permalink
fix: decode JWT for EntraID (#4625)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcosgvieira committed Mar 5, 2024
1 parent dfccae9 commit 176d562
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,15 @@ public void authenticate(final Tokens tokens) {
expires = accessToken.getToken().getExpiresAt();
groups = accessToken.getUserDetails().getGroups();
if (!isPolling()) {
refreshTokenExpiresAt =
getIdentity().authentication().decodeJWT(this.tokens.getRefreshToken()).getExpiresAt();
try {
refreshTokenExpiresAt =
getIdentity().authentication().decodeJWT(this.tokens.getRefreshToken()).getExpiresAt();
} catch (TokenDecodeException e) {
LOGGER.error(
"Unable to decode refresh token {} with exception: {}",
this.tokens.getRefreshToken(),
e.getMessage());
}
}
if (!hasExpired()) {
setAuthenticated(true);
Expand Down

0 comments on commit 176d562

Please sign in to comment.