Class GenericJWEService
- All Implemented Interfaces:
JOSEObjectService,JWEService
Generic JWEService implementation.
- Since:
- 1.5
- Author:
- Jeremy Kuhn
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceJWE compression algorithms socket used to inject JWE compression algorithms when building the JOSE module. -
Constructor Summary
ConstructorsConstructorDescriptionGenericJWEService(com.fasterxml.jackson.databind.ObjectMapper mapper, io.inverno.mod.security.jose.internal.converter.GenericDataConversionService dataConversionService, JWKService jwkService) Creates a generic JWE service. -
Method Summary
Modifier and TypeMethodDescription<T> JWEBuilder<T,?, ?> Returns a new JOSE object builder with the specified payload type and using the specified keys.voidinit()Initializes the JWE service.<T> JsonJWEBuilder<T,?, ?> jsonBuilder(Type type) Returns a new JSON JOSE object builder with the specified payload type.<T> JsonJWEReader<T,?> jsonReader(Type type) Returns a new JSON JOSE object reader with the specified payload type.<T> JWEReader<T,?> Returns a new JOSE object reader with the specified payload type and using the specified keys.voidsetJWEZips(List<JWEZip> zips) Sets the JWE compression algorithm implementations.Methods 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.jwe.JWEService
builder, builder, builder, builder, builder, jsonBuilder, jsonBuilder, jsonReader, reader, reader, reader
-
Constructor Details
-
GenericJWEService
public GenericJWEService(com.fasterxml.jackson.databind.ObjectMapper mapper, io.inverno.mod.security.jose.internal.converter.GenericDataConversionService dataConversionService, JWKService jwkService) Creates a generic JWE service.
- Parameters:
mapper- an object mapperdataConversionService- a data conversion servicejwkService- a JWK service
-
-
Method Details
-
init
public void init()Initializes the JWE service.
-
setJWEZips
Sets the JWE compression algorithm implementations.
- Parameters:
zips- a set of JWE compression algorithm implementations
-
builder
Description copied from interface:JOSEObjectServiceReturns a new JOSE object builder with the specified payload type and using the specified keys.
The returned builder will use the specified keys to secure the JOSE object, the first succeeding key will be retained and remaining keys will be ignored. It will fail if no suitable key have been specified or if they are not consistent with the JOSE header.
- Specified by:
builderin interfaceJOSEObjectService- Specified by:
builderin interfaceJWEService- Type Parameters:
T- the payload type- Parameters:
type- the payload typekeys- the keys to consider to secure the JOSE object- Returns:
- a new JOSE object builder
-
reader
Description copied from interface:JOSEObjectServiceReturns a new JOSE object reader with the specified payload type and using the specified keys.
The returned reader will use the specified keys to verify or decrypt the JOSE object, the first succeeding key will be retained and remaining keys will be ignored. It will fail if no suitable key have been specified or if they are not consistent with the JOSE header.
- Specified by:
readerin interfaceJOSEObjectService- Specified by:
readerin interfaceJWEService- Type Parameters:
T- the payload type- Parameters:
type- the payload typekeys- the keys to consider to verify or decrypt the JOSE object- Returns:
- a new JOSE object reader
-
jsonBuilder
Description copied from interface:JOSEObjectServiceReturns a new JSON JOSE object builder with the specified payload type.
- Specified by:
jsonBuilderin interfaceJOSEObjectService- Specified by:
jsonBuilderin interfaceJWEService- Type Parameters:
T- the payload type- Parameters:
type- the payload type- Returns:
- a new JSON JOSE object builder
-
jsonReader
Description copied from interface:JOSEObjectServiceReturns a new JSON JOSE object reader with the specified payload type.
- Specified by:
jsonReaderin interfaceJOSEObjectService- Specified by:
jsonReaderin interfaceJWEService- Type Parameters:
T- the payload type- Parameters:
type- the payload type- Returns:
- a new JSON JOSE object reader
-