Skip to content

Commit

Permalink
CLIENT-2623 Use base 64 url decoder for decoding the claims token.
Browse files Browse the repository at this point in the history
  • Loading branch information
ashishshinde authored Oct 24, 2023
1 parent 70d1b80 commit 4d2e9fb
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ private boolean isTokenRequired() {

private AccessToken parseToken(String token) throws IOException {
String claims = token.split("\\.")[1];
byte[] decodedClaims = Base64.getDecoder().decode(claims);
byte[] decodedClaims = Base64.getUrlDecoder().decode(claims);
@SuppressWarnings("unchecked")
Map<Object, Object> parsedClaims = objectMapper.readValue(decodedClaims, Map.class);
Object expiryToken = parsedClaims.get("exp");
Expand Down

0 comments on commit 4d2e9fb

Please sign in to comment.