Class ReactiveJwksSignature
- All Implemented Interfaces:
ReactiveSignatureConfiguration<com.nimbusds.jwt.SignedJWT>
JwksSignatureConfiguration.
If the configuration is bound to an issuer (JwksSignatureConfiguration.getIssuer()), only tokens whose iss
claim matches that issuer (see IssuerUtils.equivalent(String, String)) are verified with the key set. Tokens issued
by another issuer, or without an iss claim, are not verified, even if their signature validates against one of the keys.
The issuer is a binding on the key set, which keys are trusted to sign tokens of which issuer, and is checked before the key
set is consulted. It does not replace the validation of the iss claim by the claims validators.
If the configuration specifies a key type, only keys of that type (kty)
are used to verify a token. A token signed with a key of another type is not verified, even if that key is part of the key set.
- Since:
- 4.8.0
- Author:
- Sergio del Amo
-
Constructor Summary
ConstructorsConstructorDescriptionReactiveJwksSignature(JwksSignatureConfiguration jwksSignatureConfiguration, JwkValidator jwkValidator, JwkSetFetcher<com.nimbusds.jose.jwk.JWKSet> jwkSetFetcher) -
Method Summary
-
Constructor Details
-
ReactiveJwksSignature
public ReactiveJwksSignature(JwksSignatureConfiguration jwksSignatureConfiguration, JwkValidator jwkValidator, JwkSetFetcher<com.nimbusds.jose.jwk.JWKSet> jwkSetFetcher) - Parameters:
jwksSignatureConfiguration- JSON Web Key Set configuration.jwkValidator- JWK Validator to be used.jwkSetFetcher- Json Web Key Set fetcher
-
-
Method Details
-
verify
Verify a signed JWT. Emitsfalsewithout consulting the key set if the configuration is bound to an issuer and theissclaim of the JWT does not match it. Only keys whose type matchesJwksSignatureConfiguration.getKeyType()are considered, if a key type is configured.- Specified by:
verifyin interfaceReactiveSignatureConfiguration<com.nimbusds.jwt.SignedJWT>- Parameters:
jwt- the signed JWT- Returns:
- whether the signed JWT is verified
-