Class DefaultJWSSignerFactory
java.lang.Object
com.nimbusds.jose.crypto.factories.DefaultJWSSignerFactory
- All Implemented Interfaces:
JCAAware<JCAContext>,JOSEProvider,JWSProvider,JWSSignerFactory
A factory to create JWS signers from a JWK instance based on the
key type.
- Since:
- 2020-03-29
- Author:
- Justin Richer
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateJWSSigner(JWK key) Create a JWS signer based on the key.createJWSSigner(JWK key, JWSAlgorithm alg) Create a JWS signer based on the key and algorithm.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
-
DefaultJWSSignerFactory
public DefaultJWSSignerFactory()
-
-
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.
-
createJWSSigner
Description copied from interface:JWSSignerFactoryCreate a JWS signer based on the key.- Specified by:
createJWSSignerin interfaceJWSSignerFactory- Throws:
JOSEException
-
createJWSSigner
Description copied from interface:JWSSignerFactoryCreate a JWS signer based on the key and algorithm. Ensures that the key supports the given algorithm.- Specified by:
createJWSSignerin interfaceJWSSignerFactory- Throws:
JOSEException
-