You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Configure an OAuth2 client using Micronaut's security features.
Intercept a token request using the AbstractClientCredentialsClient.
The application throws a NullPointerException during the token expiration validation.
Error Message
NullPointerException: Cannot invoke "java.util.Map.get(Object)" because "o" is null
@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?
@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:
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: