Class DefaultJwkValidator
java.lang.Object
io.micronaut.security.token.jwt.signature.jwks.DefaultJwkValidator
- All Implemented Interfaces:
JwkValidator
Default implementation of
JwkValidator
which uses a JSON Web Signature (JWS) verifier.- Since:
- 1.1.0
- Author:
- Sergio del Amo
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected Optional<com.nimbusds.jose.JWSVerifier>
getVerifier
(com.nimbusds.jose.jwk.JWK jwk) boolean
validate
(com.nimbusds.jwt.SignedJWT jwt, com.nimbusds.jose.jwk.JWK jwk)
-
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 interfaceJwkValidator
- Parameters:
jwt
- Signed JWTjwk
- JSON Web Key- Returns:
- true if signature is verified
-
getVerifier
- Parameters:
jwk
- A JSON Web Key- Returns:
- JSON Web Signature (JWS) verifier for the given JSON Web Key.
-