Skip to content

Commit 8be97d5

Browse files
committed
Merge latest dev
1 parent 4009b7a commit 8be97d5

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

msal4j-sdk/src/main/java/com/microsoft/aad/msal4j/TokenRequestExecutor.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,7 @@ private AuthenticationResult createAuthenticationResultFromOauthHttpResponse(
124124
if (!StringHelper.isNullOrBlank(response.idToken())) {
125125
String idTokenJson;
126126
try {
127-
idTokenJson = new String(Base64.getUrlDecoder().decode(tokens.getIDTokenString().split("\\.")[1]), StandardCharsets.UTF_8);
128-
idTokenJson = new String(Base64.getDecoder().decode(response.idToken().split("\\.")[1]), StandardCharsets.UTF_8);
127+
idTokenJson = new String(Base64.getUrlDecoder().decode(response.idToken().split("\\.")[1]), StandardCharsets.UTF_8);
129128
} catch (ArrayIndexOutOfBoundsException e) {
130129
throw new MsalServiceException("Error parsing ID token, missing payload section. Ensure that the ID token is following the JWT format.",
131130
AuthenticationErrorCode.INVALID_JWT);

0 commit comments

Comments
 (0)