Class JwtClaimValidator<T>

  • All Implemented Interfaces:
    org.springframework.security.oauth2.core.OAuth2TokenValidator<Jwt>

    public final class JwtClaimValidator<T>
    extends java.lang.Object
    implements org.springframework.security.oauth2.core.OAuth2TokenValidator<Jwt>
    Validates a claim in a Jwt against a provided Predicate
    Since:
    5.3
    • Constructor Summary

      Constructors 
      Constructor Description
      JwtClaimValidator​(java.lang.String claim, java.util.function.Predicate<T> test)
      Constructs a JwtClaimValidator using the provided parameters
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.springframework.security.oauth2.core.OAuth2TokenValidatorResult validate​(Jwt token)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JwtClaimValidator

        public JwtClaimValidator​(java.lang.String claim,
                                 java.util.function.Predicate<T> test)
        Constructs a JwtClaimValidator using the provided parameters
        Parameters:
        claim - - is the name of the claim in Jwt to validate.
        test - - is the predicate function for the claim to test against.
    • Method Detail

      • validate

        public org.springframework.security.oauth2.core.OAuth2TokenValidatorResult validate​(Jwt token)
        Specified by:
        validate in interface org.springframework.security.oauth2.core.OAuth2TokenValidator<T>