Skip to content

Commit

Permalink
Used base 64 url decoder for decoding the claims token
Browse files Browse the repository at this point in the history
  • Loading branch information
ashishshinde committed Oct 21, 2023
1 parent 3378b1f commit 3287ab8
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 3287ab8

Please sign in to comment.