Module io.inverno.mod.security.jose
Class GenericECJWKGenerator
java.lang.Object
io.inverno.mod.security.jose.internal.jwk.AbstractJWKGenerator<C,D>
io.inverno.mod.security.jose.internal.jwk.AbstractX509JWKGenerator<ECPublicKey,ECPrivateKey,GenericECJWK,GenericECJWKGenerator>
io.inverno.mod.security.jose.internal.jwk.ec.GenericECJWKGenerator
- All Implemented Interfaces:
ECJWKGenerator<GenericECJWK,,GenericECJWKGenerator> JWKGenerator<GenericECJWK,,GenericECJWKGenerator> X509JWKGenerator<ECPublicKey,ECPrivateKey, GenericECJWK, GenericECJWKGenerator>
public class GenericECJWKGenerator
extends AbstractX509JWKGenerator<ECPublicKey,ECPrivateKey,GenericECJWK,GenericECJWKGenerator>
implements ECJWKGenerator<GenericECJWK,GenericECJWKGenerator>
Generic Elliptic Curve JSON Web Key generator implementation.
- Since:
- 1.5
- Author:
- Jeremy Kuhn
-
Field Summary
FieldsFields inherited from class io.inverno.mod.security.jose.internal.jwk.AbstractJWKGenerator
alg, key_ops, kid, use -
Constructor Summary
ConstructorsConstructorDescriptionCreates a generic EC JWK generator.GenericECJWKGenerator(Map<String, Object> parameters) Creates a generic EC JWK generator initialized with the specified parameters map. -
Method Summary
Modifier and TypeMethodDescriptionSpecifies the algorithm intended for use with the key.Specifies the Elliptic curve JWA name.protected reactor.core.publisher.Mono<GenericECJWK>Generates the JWK after all checks and processing have terminated successfully.protected voidSets the specified parameter into the generator.protected reactor.core.publisher.Mono<Void>verify()Verifies that the generator's parameters are consistent and that we can proceed with the generation of the key.Methods inherited from class io.inverno.mod.security.jose.internal.jwk.AbstractJWKGenerator
generate, keyId, keyOperations, publicKeyUseMethods 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.JWKGenerator
generate, keyId, keyOperations, publicKeyUse
-
Field Details
-
DEFAULT_CURVE
The default Elliptic curve.
-
-
Constructor Details
-
GenericECJWKGenerator
public GenericECJWKGenerator()Creates a generic EC JWK generator.
-
GenericECJWKGenerator
Creates a generic EC JWK generator initialized with the specified parameters map.
- Parameters:
parameters- a parameters map used to initialize the generator- Throws:
JWKGenerateException- if there was an error reading the parameters map
-
-
Method Details
-
set
Description copied from class:AbstractJWKGeneratorSets the specified parameter into the generator.
Unsupported parameters are ignored.
- Overrides:
setin classAbstractJWKGenerator<GenericECJWK,GenericECJWKGenerator> - Parameters:
field- the parameter namevalue- the parameter value- Throws:
JWKGenerateException- if there was an error reading the value
-
algorithm
Description copied from interface:JWKGeneratorSpecifies the algorithm intended for use with the key.
- Specified by:
algorithmin interfaceJWKGenerator<GenericECJWK,GenericECJWKGenerator> - Overrides:
algorithmin classAbstractJWKGenerator<GenericECJWK,GenericECJWKGenerator> - Parameters:
alg- a JWA algorithm- Returns:
- this generator
-
curve
Description copied from interface:ECJWKGeneratorSpecifies the Elliptic curve JWA name.
- Specified by:
curvein interfaceECJWKGenerator<GenericECJWK,GenericECJWKGenerator> - Parameters:
crv- the Elliptic curve JWA name- Returns:
- this generator
-
verify
protected reactor.core.publisher.Mono<Void> verify() throws JWKGenerateException, JWKProcessingExceptionDescription copied from class:AbstractJWKGeneratorVerifies that the generator's parameters are consistent and that we can proceed with the generation of the key.
- Overrides:
verifyin classAbstractJWKGenerator<GenericECJWK,GenericECJWKGenerator> - Returns:
- an empty single publisher which completes in error if generator's parameters are invalid or inconsistent
- Throws:
JWKGenerateException- if there was an error generating the JWKJWKProcessingException- if there was a JWK processing error
-
doGenerate
protected reactor.core.publisher.Mono<GenericECJWK> doGenerate() throws JWKGenerateException, JWKProcessingExceptionDescription copied from class:AbstractJWKGeneratorGenerates the JWK after all checks and processing have terminated successfully.
- Specified by:
doGeneratein classAbstractJWKGenerator<GenericECJWK,GenericECJWKGenerator> - Returns:
- a single JWK publisher
- Throws:
JWKGenerateException- if there was an error generating the JWKJWKProcessingException- if there was a JWK processing error
-