Skip to content

Commit

Permalink
add aut claim from original token as dialect/originalAut
Browse files Browse the repository at this point in the history
  • Loading branch information
malinthaprasan committed May 2, 2024
1 parent e9d1422 commit 8337e05
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@ public Map<String, Object> populateStandardClaims(JWTInfoDto jwtInfoDto) {
if (jwtInfoDto.getOrganizations() != null) {
claims.put(JWTConstants.ORGANIZATIONS, jwtInfoDto.getOrganizations());
}
Map<String, Object> jwtTokenClaims = jwtInfoDto.getJwtValidationInfo().getClaims();
if (jwtTokenClaims != null &&
jwtTokenClaims.get(JWTConstants.AUTHORIZED_USER_TYPE) != null) {
claims.put(dialect + "originalAut", jwtTokenClaims.get(JWTConstants.AUTHORIZED_USER_TYPE));
}

return claims;
}

Expand Down

0 comments on commit 8337e05

Please sign in to comment.