Skip to content

Commit

Permalink
Fix token validation logic for long-term tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
Gcolon021 committed Sep 16, 2024
1 parent 706f057 commit e8b4d7b
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,10 @@ private TokenInspection validateToken(Map<String, Object> inputMap) throws Illeg
errorMsg = "User doesn't have enough privileges.";
}

if (isAuthorizationPassed) {
if (isLongTermToken) {
// The long term token is not automatically refreshed, so we don't need to check the expiration time
tokenInspection.addField("active", true);
} else if (isAuthorizationPassed) {
tokenInspection.addField("active", true);
ArrayList<String> roles = new ArrayList<>();
for (Privilege p : user.getTotalPrivilege()) {
Expand Down

0 comments on commit e8b4d7b

Please sign in to comment.