-
Notifications
You must be signed in to change notification settings - Fork 155
Closed
Labels
BugSomething isn't working, needs an investigation and a fixSomething isn't working, needs an investigation and a fixP1High priority items, should be done before any other workHigh priority items, should be done before any other workRegressionBehavior that worked in a previous release that no longer works in a newer releaseBehavior that worked in a previous release that no longer works in a newer releaseconfidential-clientFor issues related to confidential client appsFor issues related to confidential client appspublic-clientFor questions/issues related to public client appsFor questions/issues related to public client apps
Description
Library version used
1.19.1
Java version
1.8
Scenario
ConfidentialClient - web site (AcquireTokenByAuthCode)
Is this a new or an existing app?
None
Issue description and reproduction steps
While using msal4j OAuth authentication, for specific users, the error 'java.lang.IllegalArgumentException: Illegal base64 character 2d' occurred.
The error location is as follows:
class TokenRequestExecutor {
...
private AuthenticationResult createAuthenticationResultFromOauthHttpResponse(HTTPResponse oauthHttpResponse) throws ParseException {
...
idTokenJson = new String(Base64.getDecoder().decode(tokens.getIDTokenString().split("\\.")[1]), StandardCharsets.UTF_8);
...
}
}
For your reference, this error does not occur in version 1.18.0 which uses Base64.getUrlEncoder().
Thank you
Relevant code snippets
Expected behavior
No response
Identity provider
Microsoft Entra ID (Work and School accounts and Personal Microsoft accounts)
Regression
No response
Solution and workarounds
No response
Metadata
Metadata
Assignees
Labels
BugSomething isn't working, needs an investigation and a fixSomething isn't working, needs an investigation and a fixP1High priority items, should be done before any other workHigh priority items, should be done before any other workRegressionBehavior that worked in a previous release that no longer works in a newer releaseBehavior that worked in a previous release that no longer works in a newer releaseconfidential-clientFor issues related to confidential client appsFor issues related to confidential client appspublic-clientFor questions/issues related to public client appsFor questions/issues related to public client apps