Class DefaultJWSVerifierFactory
java.lang.Object
com.nimbusds.jose.crypto.factories.DefaultJWSVerifierFactory
- All Implemented Interfaces:
JCAAware<JCAContext>,JOSEProvider,JWSProvider,JWSVerifierFactory
Default JSON Web Signature (JWS) verifier factory.
Supports all standard JWS algorithms implemented in the
com.nimbusds.jose.crypto package.
- Version:
- 2020-10-30
- Author:
- Vladimir Dzhuvinov
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateJWSVerifier(JWSHeader header, Key key) Creates a new JWS verifier for the specified header and key.Returns the Java Cryptography Architecture (JCA) context.Returns the names of the supported algorithms by the JWS provider instance.
-
Field Details
-
SUPPORTED_ALGORITHMS
The supported JWS algorithms.
-
-
Constructor Details
-
DefaultJWSVerifierFactory
public DefaultJWSVerifierFactory()
-
-
Method Details
-
supportedJWSAlgorithms
Description copied from interface:JWSProviderReturns the names of the supported algorithms by the JWS provider instance. These correspond to thealgJWS header parameter.- Specified by:
supportedJWSAlgorithmsin interfaceJWSProvider- Returns:
- The supported JWS algorithms, empty set if none.
-
getJCAContext
Description copied from interface:JCAAwareReturns the Java Cryptography Architecture (JCA) context. May be used to set a specific JCA security provider or secure random generator.- Specified by:
getJCAContextin interfaceJCAAware<JCAContext>- Returns:
- The JCA context. Not
null.
-
createJWSVerifier
Description copied from interface:JWSVerifierFactoryCreates a new JWS verifier for the specified header and key.- Specified by:
createJWSVerifierin interfaceJWSVerifierFactory- Parameters:
header- The JWS header. Notnull.key- The key intended to verify the JWS message. Notnull.- Returns:
- The JWS verifier.
- Throws:
JOSEException- If the JWS algorithm is not supported or the key type or length doesn't match the expected for the JWS algorithm.
-