reta commented on code in PR #3518:
URL: https://github.com/apache/cxf/pull/3518#discussion_r4132675606


##########
rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/jwt/AbstractJwtHandler.java:
##########
@@ -69,6 +69,11 @@ protected void validateClaims(Client client, JwtClaims 
claims) {
         if (claims.getClaim(JwtConstants.CLAIM_EXPIRY) == null) {
             throw new OAuthServiceException(OAuthConstants.INVALID_GRANT);
         }
+
+        // We must have an Audience (RFC 7523, section 3)
+        if (claims.getAudiences().isEmpty()) {

Review Comment:
   I think it belongs to `JwtUtils::validateTokenClaims(JwtClaims, int, int, 
boolean)`, which is called from `JwtUtils.validateTokenClaims` above - it has 
exactly the same check but just does nothing.



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