Module io.inverno.mod.security.jose
Class SignatureJWSReader<A>
java.lang.Object
io.inverno.mod.security.jose.internal.AbstractJOSEObjectReader<A,JWSHeader,JWS<A>,GenericJWSReader<A>>
io.inverno.mod.security.jose.internal.jws.GenericJWSReader<A>
io.inverno.mod.security.jose.internal.jws.SignatureJWSReader<A>
- Type Parameters:
A- the expected payload type
- All Implemented Interfaces:
JOSEObjectReader<A,,JWSHeader, JWS<A>, GenericJWSReader<A>> JWSReader<A,GenericJWSReader<A>>
JSON JWS signature specific JWS reader used to read signature specific JWS when reading a JSON JWS.
- Since:
- 1.5
- Author:
- Jeremy Kuhn
-
Field Summary
Fields inherited from class io.inverno.mod.security.jose.internal.AbstractJOSEObjectReader
applicationProcessedParameters, dataConversionService, jwkService, keys, mapper, type -
Constructor Summary
ConstructorsConstructorDescriptionSignatureJWSReader(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 jwsHeader, GenericJWSPayload<A> jwsPayload) Creates a JSON JWS signature reader. -
Method Summary
Modifier and TypeMethodDescriptionprotected GenericJWSHeaderreadJWSHeader(String encodedHeader) Reads the JWS header.protected reactor.core.publisher.Mono<GenericJWSPayload<A>>readJWSPayload(String encodedPayload, Function<String, reactor.core.publisher.Mono<A>> overridingPayloadDecoder, String overridingContentType, GenericJWSHeader jwsHeader) Reads the JWS payload.Methods inherited from class io.inverno.mod.security.jose.internal.jws.GenericJWSReader
read, readMethods inherited from class io.inverno.mod.security.jose.internal.AbstractJOSEObjectReader
checkCriticalParameters, checkHeader, getKeys, getPayloadDecoder, getProcessedParameters, processedParametersMethods 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.JOSEObjectReader
processedParameters, read
-
Constructor Details
-
SignatureJWSReader
public SignatureJWSReader(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 jwsHeader, GenericJWSPayload<A> jwsPayload) Creates a JSON JWS signature reader.
- Parameters:
mapper- an object mapperdataConversionService- a data conversion servicejwkService- a JWK servicetype- the expected payload typekeys- the signature specific keys to consider to verify the JWSjwsHeader- the signature JWS headerjwsPayload- the JSON JWS payload
-
-
Method Details
-
readJWSHeader
protected GenericJWSHeader readJWSHeader(String encodedHeader) throws JWSReadException, JOSEObjectReadException, JOSEProcessingException Description copied from class:GenericJWSReaderReads the JWS header.
- Overrides:
readJWSHeaderin classGenericJWSReader<A>- Parameters:
encodedHeader- the Base64URL encoded JWS header- Returns:
- the JWS header
- Throws:
JWSReadException- if there was an error reading the JWS headerJOSEObjectReadException- if there was an error reading the JWS headerJOSEProcessingException- if there was a JOSE processing error
-
readJWSPayload
protected reactor.core.publisher.Mono<GenericJWSPayload<A>> readJWSPayload(String encodedPayload, Function<String, reactor.core.publisher.Mono<A>> overridingPayloadDecoder, String overridingContentType, GenericJWSHeader jwsHeader) throws JWSReadException, JOSEObjectReadException, JOSEProcessingExceptionDescription copied from class:GenericJWSReaderReads the JWS payload.
- Overrides:
readJWSPayloadin classGenericJWSReader<A>- Parameters:
encodedPayload- the Base64URL encoded payloadoverridingPayloadDecoder- an overriding payload decoderoverridingContentType- an overriding payload content typejwsHeader- the JWS header- Returns:
- a single JWS payload publisher
- Throws:
JWSReadException- if there was an error reading the JWS payloadJOSEObjectReadException- if there was an error reading the JWS payloadJOSEProcessingException- if there was a JOSE processing error
-