Module io.inverno.mod.security.jose
Class GenericECJWKFactory
java.lang.Object
io.inverno.mod.security.jose.internal.jwk.AbstractJWKFactory<C,D,E>
io.inverno.mod.security.jose.internal.jwk.AbstractX509JWKFactory<ECPublicKey,ECPrivateKey,GenericECJWK,GenericECJWKBuilder,GenericECJWKGenerator>
io.inverno.mod.security.jose.internal.jwk.ec.GenericECJWKFactory
- All Implemented Interfaces:
ECJWKFactory<GenericECJWK,,GenericECJWKBuilder, GenericECJWKGenerator> JWKFactory<GenericECJWK,,GenericECJWKBuilder, GenericECJWKGenerator> X509JWKFactory<ECPublicKey,ECPrivateKey, GenericECJWK, GenericECJWKBuilder, GenericECJWKGenerator>
public class GenericECJWKFactory
extends AbstractX509JWKFactory<ECPublicKey,ECPrivateKey,GenericECJWK,GenericECJWKBuilder,GenericECJWKGenerator>
implements ECJWKFactory<GenericECJWK,GenericECJWKBuilder,GenericECJWKGenerator>
Generic Elliptic Curve JSON Web Key factory implementation.
It supports the EC key type and the following algorithms:
- ES256
- ES384
- ES512
- ES256K (deprecated)
- ECDH-ES with elliptic curve P-256, P-384 or P-521
- ECDH-ES+A128KW with elliptic curve P-256, P-384 or P-521
- ECDH-ES+A192KW with elliptic curve P-256, P-384 or P-521
- ECDH-ES+A256KW with elliptic curve P-256, P-384 or P-521
- 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
ConstructorsConstructorDescriptionGenericECJWKFactory(JOSEConfiguration configuration, JWKStore jwkStore, JWKKeyResolver keyResolver, com.fasterxml.jackson.databind.ObjectMapper mapper, SwitchableJWKURLResolver urlResolver, X509JWKCertPathValidator certPathValidator) Creates a generic EC 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
-
GenericECJWKFactory
public GenericECJWKFactory(JOSEConfiguration configuration, JWKStore jwkStore, JWKKeyResolver keyResolver, com.fasterxml.jackson.databind.ObjectMapper mapper, SwitchableJWKURLResolver urlResolver, X509JWKCertPathValidator certPathValidator) Creates a generic EC 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<GenericECJWK,GenericECJWKBuilder, GenericECJWKGenerator> - 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<GenericECJWK,GenericECJWKBuilder, GenericECJWKGenerator> - 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<GenericECJWK,GenericECJWKBuilder, GenericECJWKGenerator> - 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<GenericECJWK,GenericECJWKBuilder, GenericECJWKGenerator> - 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<GenericECJWK,GenericECJWKBuilder, GenericECJWKGenerator> - Returns:
- a new JWK generator
-
generator
public GenericECJWKGenerator 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<GenericECJWK,GenericECJWKBuilder, GenericECJWKGenerator> - Parameters:
alg- a JWK algorithmparameters- a parameters map- Returns:
- a new JWK generator
- Throws:
JWKGenerateException
-