Class GenericJWSService
- All Implemented Interfaces:
JOSEObjectService,JWSService
Generic JWSService implementation.
- Since:
- 1.5
- Author:
- Jeremy Kuhn
-
Constructor Summary
ConstructorsConstructorDescriptionGenericJWSService(com.fasterxml.jackson.databind.ObjectMapper mapper, io.inverno.mod.security.jose.internal.converter.GenericDataConversionService dataConversionService, JWKService jwkService) Creates a generic JWS service. -
Method Summary
Modifier and TypeMethodDescription<T> JWSBuilder<T,?, ?> Returns a new JOSE object builder with the specified payload type and using the specified keys.voidinit()Initializes the JWS service.<T> JsonJWSBuilder<T,?, ?> jsonBuilder(Type type) Returns a new JSON JOSE object builder with the specified payload type.<T> JsonJWSReader<T,?> jsonReader(Type type) Returns a new JSON JOSE object reader with the specified payload type.<T> JWSReader<T,?> Returns a new JOSE object reader with the specified payload type and using the specified keys.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.jws.JWSService
builder, builder, builder, builder, builder, jsonBuilder, jsonBuilder, jsonReader, reader, reader, reader
-
Constructor Details
-
GenericJWSService
public GenericJWSService(com.fasterxml.jackson.databind.ObjectMapper mapper, io.inverno.mod.security.jose.internal.converter.GenericDataConversionService dataConversionService, JWKService jwkService) Creates a generic JWS service.
- Parameters:
mapper- an object mapperdataConversionService- a data conversion servicejwkService- a JWK service
-
-
Method Details
-
init
public void init()Initializes the JWS service.
-
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 interfaceJWSService- 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 interfaceJWSService- 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 interfaceJWSService- 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 interfaceJWSService- Type Parameters:
T- the payload type- Parameters:
type- the payload type- Returns:
- a new JSON JOSE object reader
-