-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NullPointerException in AbstractClientCredentialsClient.expirationDate due to null value in java.util.Map #1770
Comments
@RicardoRB what kind of token you are getting a Null pointer exception with? Can you provide an example of an actual token which crashes for you? Moreover, what version of Micronaut Security are you working with? |
I don't have an example of a toke, sorry for that. The version for security is:
|
can you reproduce that it is still an issue in Micronaut 4 ? |
Expected Behavior
The method should handle null values gracefully, either by returning a default value or throwing a more descriptive exception.
Actual Behaviour
When attempting to validate the expiration of an OAuth2 token using the AbstractClientCredentialsClient, the application encounters a NullPointerException. This occurs because the OAuth interceptor does not properly handle a null value within the java.util.Map that is used during the token parsing or validation process. As a result, the application crashes unexpectedly, making it impossible to retrieve or validate tokens in certain scenarios.
Steps To Reproduce
Error Message
NullPointerException: Cannot invoke "java.util.Map.get(Object)" because "o" is null
Stack Trace
Environment Information
JVM Version: 17.0.8.1
Example Application
No response
Version
The text was updated successfully, but these errors were encountered: