coheigea commented on code in PR #3294:
URL: https://github.com/apache/cxf/pull/3294#discussion_r3550305164


##########
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:
   @reta Copilot tells me that:
   
   ```
   token_use is not a standard JWT access-token claim across issuers, so making 
it mandatory by default would break interoperability.
   typ=at+jwt is the better protocol-level discriminator, but many deployments 
still omit it.
   ```
   
   So I think we should keep the current logic, which is intended to make sure 
that an IdToken can't be processed by the validator.



-- 
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]

Reply via email to