Module io.inverno.mod.security.jose
Class SignatureJWSBuilder<A>
java.lang.Object
io.inverno.mod.security.jose.internal.AbstractJOSEObjectBuilder<A,JWSHeader,JWS<A>,GenericJWSHeader,GenericJWSBuilder<A>>
io.inverno.mod.security.jose.internal.jws.GenericJWSBuilder<A>
io.inverno.mod.security.jose.internal.jws.SignatureJWSBuilder<A>
- Type Parameters:
A- the payload type
- All Implemented Interfaces:
JOSEObjectBuilder<A,,JWSHeader, JWS<A>, GenericJWSHeader, GenericJWSBuilder<A>> JWSBuilder<A,GenericJWSHeader, GenericJWSBuilder<A>>
JSON JWS Signature specific JWS builder used to build signature specific JWS when building a JSON JWS.
- Since:
- 1.5
- Author:
- Jeremy Kuhn
-
Field Summary
Fields inherited from class io.inverno.mod.security.jose.internal.jws.GenericJWSBuilder
headerConfigurerFields inherited from class io.inverno.mod.security.jose.internal.AbstractJOSEObjectBuilder
dataConversionService, jwkService, keys, mapper, payload, type -
Constructor Summary
ConstructorsConstructorDescriptionSignatureJWSBuilder(com.fasterxml.jackson.databind.ObjectMapper mapper, io.inverno.mod.security.jose.internal.converter.DataConversionService dataConversionService, JWKService jwkService, Type type, org.reactivestreams.Publisher<? extends JWK> keys, GenericJWSHeader signatureProtectedJWSHeader, GenericJWSHeader jwsHeader, GenericJWSPayload<A> jwsPayload) Creates a JSON JWS signature builder. -
Method Summary
Modifier and TypeMethodDescriptionprotected GenericJWSHeaderBuilds the JWS header.protected reactor.core.publisher.Mono<GenericJWSPayload<A>>buildJWSPayload(Function<A, reactor.core.publisher.Mono<String>> overridingPayloadEncoder, String overridingContentType, GenericJWSHeader jwsHeader) Builds the JWS payload.header(Consumer<GenericJWSHeader> configurer) Specifies the JOSE header.Specifies the JOSE object payload.Methods inherited from class io.inverno.mod.security.jose.internal.jws.GenericJWSBuilder
build, buildMethods inherited from class io.inverno.mod.security.jose.internal.AbstractJOSEObjectBuilder
checkHeader, checkPayload, getKeys, getPayloadEncoder, getProcessedParametersMethods 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.JOSEObjectBuilder
build
-
Constructor Details
-
SignatureJWSBuilder
public SignatureJWSBuilder(com.fasterxml.jackson.databind.ObjectMapper mapper, io.inverno.mod.security.jose.internal.converter.DataConversionService dataConversionService, JWKService jwkService, Type type, org.reactivestreams.Publisher<? extends JWK> keys, GenericJWSHeader signatureProtectedJWSHeader, GenericJWSHeader jwsHeader, GenericJWSPayload<A> jwsPayload) Creates a JSON JWS signature builder.
- Parameters:
mapper- an object mapperdataConversionService- a data conversion servicejwkService- a JWK servicetype- the payload typekeys- the signature specific keys to consider to sign the JWSsignatureProtectedJWSHeader- the signature specific protected JWSheaderjwsHeader- the signaTure JWS headerjwsPayload- the JSON JWS payload
-
-
Method Details
-
header
Description copied from interface:JOSEObjectBuilderSpecifies the JOSE header.
- Specified by:
headerin interfaceJOSEObjectBuilder<A,JWSHeader, JWS<A>, GenericJWSHeader, GenericJWSBuilder<A>> - Overrides:
headerin classGenericJWSBuilder<A>- Parameters:
configurer- a JOSE header configurer- Returns:
- this builder
-
payload
Description copied from interface:JOSEObjectBuilderSpecifies the JOSE object payload.
- Specified by:
payloadin interfaceJOSEObjectBuilder<A,JWSHeader, JWS<A>, GenericJWSHeader, GenericJWSBuilder<A>> - Overrides:
payloadin classAbstractJOSEObjectBuilder<A,JWSHeader, JWS<A>, GenericJWSHeader, GenericJWSBuilder<A>> - Parameters:
payload- a payload- Returns:
- this builder
-
buildJWSHeader
protected GenericJWSHeader buildJWSHeader() throws JWSBuildException, JOSEObjectBuildException, JOSEProcessingExceptionDescription copied from class:GenericJWSBuilderBuilds the JWS header.
- Overrides:
buildJWSHeaderin classGenericJWSBuilder<A>- Returns:
- the JWS header
- Throws:
JWSBuildException- if there was an error building the JWS headerJOSEObjectBuildException- if there was an error building the JWS headerJOSEProcessingException- if there was a JOSE processing error
-
buildJWSPayload
protected reactor.core.publisher.Mono<GenericJWSPayload<A>> buildJWSPayload(Function<A, reactor.core.publisher.Mono<String>> overridingPayloadEncoder, String overridingContentType, GenericJWSHeader jwsHeader) throws JWSBuildException, JOSEObjectBuildException, JOSEProcessingExceptionDescription copied from class:GenericJWSBuilderBuilds the JWS payload.
- Overrides:
buildJWSPayloadin classGenericJWSBuilder<A>- Parameters:
overridingPayloadEncoder- an overriding payload encoderoverridingContentType- an overriding payload content typejwsHeader- the JWS header- Returns:
- a single JWS payload publisher
- Throws:
JWSBuildException- if there was an error building the JWS payloadJOSEObjectBuildException- if there was an error building the JWS payloadJOSEProcessingException- if there was a JOSE processing error
-