Class AudienceJwtClaimsValidator<T>
java.lang.Object
io.micronaut.security.token.jwt.validator.AudienceJwtClaimsValidator<T>
- Type Parameters:
T
- Request
- All Implemented Interfaces:
GenericJwtClaimsValidator<T>
,JwtClaimsValidator<T>
@Singleton
@Requires(property="micronaut.security.token.jwt.claims-validators.audience")
public class AudienceJwtClaimsValidator<T>
extends Object
implements GenericJwtClaimsValidator<T>
Validates JWT audience claim contains a configured value.
- Since:
- 2.4.0
- Author:
- Jason Schindler, Sergio del Amo
-
Constructor Summary
ConstructorDescriptionAudienceJwtClaimsValidator
(JwtClaimsValidatorConfiguration jwtClaimsValidatorConfiguration) -
Method Summary
-
Constructor Details
-
AudienceJwtClaimsValidator
- Parameters:
jwtClaimsValidatorConfiguration
- JWT Claims Validator Configuration
-
-
Method Details
-
validate
protected boolean validate(com.nimbusds.jwt.JWTClaimsSet claimsSet) - Parameters:
claimsSet
- JWT Claims- Returns:
- True if the JWT audience claim contains the expected value
-
validate
- Specified by:
validate
in interfaceJwtClaimsValidator<T>
- Parameters:
claims
- JWT Claimsrequest
- HTTP request- Returns:
- whether the JWT claims pass validation.
-