Class SubjectNotNullJwtClaimsValidator<T>

java.lang.Object
io.micronaut.security.token.jwt.validator.SubjectNotNullJwtClaimsValidator<T>
Type Parameters:
T - Request
All Implemented Interfaces:
GenericJwtClaimsValidator<T>, JwtClaimsValidator<T>

@Singleton @Requires(property="micronaut.security.token.jwt.claims-validators.subject-not-null", notEquals="false") public class SubjectNotNullJwtClaimsValidator<T> extends Object implements GenericJwtClaimsValidator<T>
Validate JWT subject claim is not null.
Since:
1.1.0
Author:
Sergio del Amo
  • Constructor Details

    • SubjectNotNullJwtClaimsValidator

      public SubjectNotNullJwtClaimsValidator()
  • Method Details

    • validate

      public boolean validate(com.nimbusds.jwt.JWTClaimsSet claimsSet)
      Parameters:
      claimsSet - JWT Claims
      Returns:
      True if the JWT subject claim is not null
    • validate

      public boolean validate(@NonNull @NonNull Claims claims, @Nullable T request)
      Specified by:
      validate in interface JwtClaimsValidator<T>
      Parameters:
      claims - JWT Claims
      request - HTTP request
      Returns:
      whether the JWT claims pass validation.