Module io.inverno.mod.security.jose
Class GenericEdECJWKFactory
java.lang.Object
io.inverno.mod.security.jose.internal.jwk.AbstractJWKFactory<C,D,E>
io.inverno.mod.security.jose.internal.jwk.AbstractX509JWKFactory<A,B,C,D,E>
io.inverno.mod.security.jose.internal.jwk.okp.AbstractOKPJWKFactory<EdECPublicKey,EdECPrivateKey,GenericEdECJWK,GenericEdECJWKBuilder,GenericEdECJWKGenerator>
io.inverno.mod.security.jose.internal.jwk.okp.GenericEdECJWKFactory
- All Implemented Interfaces:
JWKFactory<GenericEdECJWK,,GenericEdECJWKBuilder, GenericEdECJWKGenerator> EdECJWKFactory<GenericEdECJWK,,GenericEdECJWKBuilder, GenericEdECJWKGenerator> OKPJWKFactory<EdECPublicKey,,EdECPrivateKey, GenericEdECJWK, GenericEdECJWKBuilder, GenericEdECJWKGenerator> X509JWKFactory<EdECPublicKey,EdECPrivateKey, GenericEdECJWK, GenericEdECJWKBuilder, GenericEdECJWKGenerator>
public class GenericEdECJWKFactory
extends AbstractOKPJWKFactory<EdECPublicKey,EdECPrivateKey,GenericEdECJWK,GenericEdECJWKBuilder,GenericEdECJWKGenerator>
implements EdECJWKFactory<GenericEdECJWK,GenericEdECJWKBuilder,GenericEdECJWKGenerator>
Generic Edward-Curve JWK factory implementation.
It supports the OKP key type and the following algorithms:
- EdDSA with elliptic curve Ed25519 and Ed448.
- 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
ConstructorsConstructorDescriptionGenericEdECJWKFactory(JOSEConfiguration configuration, JWKStore jwkStore, JWKKeyResolver keyResolver, com.fasterxml.jackson.databind.ObjectMapper mapper, SwitchableJWKURLResolver urlResolver, X509JWKCertPathValidator certPathValidator) Creates a generic EdEC 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.booleansupportsAlgorithm(String alg) Determines whether the factory supports the specified algorithm.Methods inherited from class io.inverno.mod.security.jose.internal.jwk.okp.AbstractOKPJWKFactory
supportsMethods 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, supports
-
Constructor Details
-
GenericEdECJWKFactory
public GenericEdECJWKFactory(JOSEConfiguration configuration, JWKStore jwkStore, JWKKeyResolver keyResolver, com.fasterxml.jackson.databind.ObjectMapper mapper, SwitchableJWKURLResolver urlResolver, X509JWKCertPathValidator certPathValidator) Creates a generic EdEC 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
-
supportsAlgorithm
Description copied from interface:JWKFactoryDetermines whether the factory supports the specified algorithm.
- Specified by:
supportsAlgorithmin interfaceJWKFactory<GenericEdECJWK,GenericEdECJWKBuilder, GenericEdECJWKGenerator> - 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<GenericEdECJWK,GenericEdECJWKBuilder, GenericEdECJWKGenerator> - 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<GenericEdECJWK,GenericEdECJWKBuilder, GenericEdECJWKGenerator> - 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<GenericEdECJWK,GenericEdECJWKBuilder, GenericEdECJWKGenerator> - Returns:
- a new JWK generator
-
generator
public GenericEdECJWKGenerator 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<GenericEdECJWK,GenericEdECJWKBuilder, GenericEdECJWKGenerator> - Parameters:
alg- a JWK algorithmparameters- a parameters map- Returns:
- a new JWK generator
- Throws:
JWKGenerateException
-