Module io.inverno.mod.security.jose
Class GenericPBES2JWKFactory
java.lang.Object
io.inverno.mod.security.jose.internal.jwk.AbstractJWKFactory<GenericPBES2JWK,GenericPBES2JWKBuilder,GenericPBES2JWKGenerator>
io.inverno.mod.security.jose.internal.jwk.pbes2.GenericPBES2JWKFactory
- All Implemented Interfaces:
JWKFactory<GenericPBES2JWK,,GenericPBES2JWKBuilder, GenericPBES2JWKGenerator> PBES2JWKFactory<GenericPBES2JWK,GenericPBES2JWKBuilder, GenericPBES2JWKGenerator>
public class GenericPBES2JWKFactory
extends AbstractJWKFactory<GenericPBES2JWK,GenericPBES2JWKBuilder,GenericPBES2JWKGenerator>
implements PBES2JWKFactory<GenericPBES2JWK,GenericPBES2JWKBuilder,GenericPBES2JWKGenerator>
Generic Password-based JSON Web Key factory implementation.
It supports the OCT key type and the following algorithms:
- PBES2-HS256+A128KW
- PBES2-HS384+A192KW
- PBES2-HS512+A256KW
- Since:
- 1.5
- Author:
- Jeremy Kuhn
-
Field Summary
Fields inherited from class io.inverno.mod.security.jose.internal.jwk.AbstractJWKFactory
configuration, jwkStore, keyResolver, mapper -
Constructor Summary
ConstructorsConstructorDescriptionGenericPBES2JWKFactory(JOSEConfiguration configuration, JWKStore jwkStore, JWKKeyResolver keyResolver, com.fasterxml.jackson.databind.ObjectMapper mapper) Creates a generic PBES2 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
-
GenericPBES2JWKFactory
public GenericPBES2JWKFactory(JOSEConfiguration configuration, JWKStore jwkStore, JWKKeyResolver keyResolver, com.fasterxml.jackson.databind.ObjectMapper mapper) Creates a generic PBES2 JWK factory.
- Parameters:
configuration- the JOSE module configurationjwkStore- a JWK storekeyResolver- a JWK key resolvermapper- an object mapper
-
-
Method Details
-
supports
Description copied from interface:JWKFactoryDetermines whether the factory supports the specified key type.
- Specified by:
supportsin interfaceJWKFactory<GenericPBES2JWK,GenericPBES2JWKBuilder, GenericPBES2JWKGenerator> - 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<GenericPBES2JWK,GenericPBES2JWKBuilder, GenericPBES2JWKGenerator> - 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<GenericPBES2JWK,GenericPBES2JWKBuilder, GenericPBES2JWKGenerator> - 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<GenericPBES2JWK,GenericPBES2JWKBuilder, GenericPBES2JWKGenerator> - 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<GenericPBES2JWK,GenericPBES2JWKBuilder, GenericPBES2JWKGenerator> - Returns:
- a new JWK generator
-
generator
public GenericPBES2JWKGenerator 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<GenericPBES2JWK,GenericPBES2JWKBuilder, GenericPBES2JWKGenerator> - Parameters:
alg- a JWK algorithmparameters- a parameters map- Returns:
- a new JWK generator
- Throws:
JWKGenerateException
-