reta commented on code in PR #3294:
URL: https://github.com/apache/cxf/pull/3294#discussion_r3544104851
##########
rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/JwtAccessTokenValidator.java:
##########
@@ -76,6 +81,18 @@ protected void validateToken(JwtToken jwt) {
JwtUtils.validateTokenClaims(jwt.getClaims(), getTtl(),
getClockOffset(), isValidateAudience());
}
+ private void validateTokenType(JwtToken jwt) {
+ Object tokenType = jwt.getJwsHeader(JoseConstants.HEADER_TYPE);
+ if (tokenType != null &&
!JoseConstants.TYPE_AT_JWT.equals(tokenType.toString())) {
Review Comment:
I am wondering if token type has to be present all the time? (== required)
Or it is optional?
```suggestion
if (tokenType == null ||
!JoseConstants.TYPE_AT_JWT.equals(tokenType.toString())) {
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]