Module io.inverno.mod.security.jose
Class GenericRSAJWKFactory
java.lang.Object
io.inverno.mod.security.jose.internal.jwk.AbstractJWKFactory<C,D,E>
io.inverno.mod.security.jose.internal.jwk.AbstractX509JWKFactory<RSAPublicKey,RSAPrivateKey,GenericRSAJWK,GenericRSAJWKBuilder,GenericRSAJWKGenerator>
io.inverno.mod.security.jose.internal.jwk.rsa.GenericRSAJWKFactory
- All Implemented Interfaces:
JWKFactory<GenericRSAJWK,,GenericRSAJWKBuilder, GenericRSAJWKGenerator> RSAJWKFactory<GenericRSAJWK,,GenericRSAJWKBuilder, GenericRSAJWKGenerator> X509JWKFactory<RSAPublicKey,RSAPrivateKey, GenericRSAJWK, GenericRSAJWKBuilder, GenericRSAJWKGenerator>
public class GenericRSAJWKFactory
extends AbstractX509JWKFactory<RSAPublicKey,RSAPrivateKey,GenericRSAJWK,GenericRSAJWKBuilder,GenericRSAJWKGenerator>
implements RSAJWKFactory<GenericRSAJWK,GenericRSAJWKBuilder,GenericRSAJWKGenerator>
Generic RSA JSON Web Key factory implementation.
It supports the RSA key type and the following algorithms:
- RS1
- RS256
- RS384
- RS512
- PS256
- PS384
- PS512
- RSA1_5
- RSA-OAEP
- RSA-OAEP-256
- RSA-OAEP-384
- RSA-OAEP-512
- Since:
- 1.5
- Author:
- Jeremy Kuhn
-
Field Summary
Fields inherited from class io.inverno.mod.security.jose.internal.jwk.AbstractX509JWKFactory
certPathValidator, urlResolverFields inherited from class io.inverno.mod.security.jose.internal.jwk.AbstractJWKFactory
configuration, jwkStore, keyResolver, mapper -
Constructor Summary
ConstructorsConstructorDescriptionGenericRSAJWKFactory(JOSEConfiguration configuration, JWKStore jwkStore, JWKKeyResolver keyResolver, com.fasterxml.jackson.databind.ObjectMapper mapper, SwitchableJWKURLResolver urlResolver, X509JWKCertPathValidator certPathValidator) Creates a generic RSA JWK factory. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Returns a new JWK builder for the key type supported by the factory.Returns a new JWK builder initialized with the specified parameters map.Returns a new JWK builder for the key type supported by the factory.Returns a new JWK generator initialized with the specified parameters map.booleanDetermines whether the factory supports the specified key type.booleansupportsAlgorithm(String alg) Determines whether the factory supports the specified algorithm.Methods inherited from class io.inverno.mod.security.jose.internal.jwk.AbstractJWKFactory
generate, read, readMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.inverno.mod.security.jose.jwk.JWKFactory
generate, read, read
-
Constructor Details
-
GenericRSAJWKFactory
public GenericRSAJWKFactory(JOSEConfiguration configuration, JWKStore jwkStore, JWKKeyResolver keyResolver, com.fasterxml.jackson.databind.ObjectMapper mapper, SwitchableJWKURLResolver urlResolver, X509JWKCertPathValidator certPathValidator) Creates a generic RSA JWK factory.
- Parameters:
configuration- the JOSE module configurationjwkStore- a JWK storekeyResolver- a JWK key resolvermapper- an object mapperurlResolver- a JWK URL resolvercertPathValidator- an X.509 certificate path validator
-
-
Method Details
-
supports
Description copied from interface:JWKFactoryDetermines whether the factory supports the specified key type.
- Specified by:
supportsin interfaceJWKFactory<GenericRSAJWK,GenericRSAJWKBuilder, GenericRSAJWKGenerator> - Parameters:
kty- a JWA key type- Returns:
- true if the factory supports the key type, false otherwise
-
supportsAlgorithm
Description copied from interface:JWKFactoryDetermines whether the factory supports the specified algorithm.
- Specified by:
supportsAlgorithmin interfaceJWKFactory<GenericRSAJWK,GenericRSAJWKBuilder, GenericRSAJWKGenerator> - Parameters:
alg- a JWA algorithm- Returns:
- true if the factory supports the algorithm, false otherwise
-
builder
Description copied from interface:JWKFactoryReturns a new JWK builder for the key type supported by the factory.
- Specified by:
builderin interfaceJWKFactory<GenericRSAJWK,GenericRSAJWKBuilder, GenericRSAJWKGenerator> - Returns:
- a new JWK builder
-
builder
Description copied from class:AbstractJWKFactoryReturns a new JWK builder initialized with the specified parameters map.
- Specified by:
builderin classAbstractJWKFactory<GenericRSAJWK,GenericRSAJWKBuilder, GenericRSAJWKGenerator> - Parameters:
parameters- a parameters map- Returns:
- a new JWK builder
- Throws:
JWKReadException
-
generator
Description copied from interface:JWKFactoryReturns a new JWK builder for the key type supported by the factory.
- Specified by:
generatorin interfaceJWKFactory<GenericRSAJWK,GenericRSAJWKBuilder, GenericRSAJWKGenerator> - Returns:
- a new JWK generator
-
generator
public GenericRSAJWKGenerator generator(String alg, Map<String, Object> parameters) throws JWKGenerateExceptionDescription copied from class:AbstractJWKFactoryReturns a new JWK generator initialized with the specified parameters map.
- Specified by:
generatorin classAbstractJWKFactory<GenericRSAJWK,GenericRSAJWKBuilder, GenericRSAJWKGenerator> - Parameters:
alg- a JWK algorithmparameters- a parameters map- Returns:
- a new JWK generator
- Throws:
JWKGenerateException
-