Class DefaultJwkValidator

java.lang.Object
io.micronaut.security.token.jwt.signature.jwks.DefaultJwkValidator
All Implemented Interfaces:
JwkValidator

@Singleton public class DefaultJwkValidator extends Object implements JwkValidator
Default implementation of JwkValidator which uses a JSON Web Signature (JWS) verifier.
Since:
1.1.0
Author:
Sergio del Amo
  • Constructor Details

    • DefaultJwkValidator

      public DefaultJwkValidator()
  • Method Details

    • validate

      public boolean validate(com.nimbusds.jwt.SignedJWT jwt, com.nimbusds.jose.jwk.JWK jwk)
      Specified by:
      validate in interface JwkValidator
      Parameters:
      jwt - Signed JWT
      jwk - JSON Web Key
      Returns:
      true if signature is verified
    • getVerifier

      protected Optional<com.nimbusds.jose.JWSVerifier> getVerifier(com.nimbusds.jose.jwk.JWK jwk)
      Parameters:
      jwk - A JSON Web Key
      Returns:
      JSON Web Signature (JWS) verifier for the given JSON Web Key.