JwtTimeStampValidator uses wrong error on token expiration #10319
Labels
in: oauth2
An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)
status: backported
An issue that has been backported to maintenance branches
type: bug
A general bug
Milestone
Summary
I think the JwtTimeStampValidator uses the wrong error type when a token expires:
spring-security/oauth2/oauth2-jose/src/main/java/org/springframework/security/oauth2/jwt/JwtTimestampValidator.java
Line 93 in 339a053
As listed in https://datatracker.ietf.org/doc/html/rfc6750#section-3.1 it should use INVALID_TOKEN error.
Actual Behavior
JwtTimeStampValidator uses INVALID_REQUEST error when a token expires
Expected Behavior
JwtTimeStampValidator should uses INVALID_TOKEN error when a token expires
Version
5.5.2
Sample
spring-security/oauth2/oauth2-jose/src/main/java/org/springframework/security/oauth2/jwt/JwtTimestampValidator.java
Line 93 in 339a053
The text was updated successfully, but these errors were encountered: