Interface JsonJWS.ReadSignature<A>
- Type Parameters:
A
- the payload type
- All Superinterfaces:
JsonJWS.Signature<A>
- Enclosing interface:
JsonJWS<A,
B extends JsonJWS.Signature<A>>
Read signature resulting from the read of a JSON JWS and exposing a single JWS publisher used to validate the signature JWS.
- Since:
- 1.5
- Author:
- Jeremy Kuhn
-
Method Summary
Methods inherited from interface io.inverno.mod.security.jose.jws.JsonJWS.Signature
equals, getProtectedHeader, getSignature, getUnprotectedHeader, hashCode
-
Method Details
-
readJWS
Mono<JWS<A>> readJWS() throws JWSReadException, JWSBuildException, JOSEObjectReadException, JOSEObjectBuildException, JOSEProcessingExceptionReturns the signature JWS publisher.
The resulting publisher will try to resolve the JWK to use for validating the signature based on the JWS JOSE header resulting from the merge of the protected and unprotected headers. It will fail if it wasn't able to find a suitable key.
- Returns:
- a JWS publisher for validating the recipient JWS
- Throws:
JWSReadException
- if there was an error reading the recipient JWSJWSBuildException
- if there was an error building the recipient JWSJOSEObjectReadException
- if there was a JOSE object reading errorJOSEObjectBuildException
- if there was a JOSE object building errorJOSEProcessingException
- if there was a JOSE processing error
-
readJWS
Mono<JWS<A>> readJWS(Publisher<? extends JWK> keys) throws JWSReadException, JWSBuildException, JOSEObjectReadException, JOSEObjectBuildException, JOSEProcessingException Returns the signature JWS publisher with the specified keys.
The resulting publisher will use the specified keys for validating the signature, 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 JWS JOSE header resulting from the merge of the protected and unprotected headers.
- Parameters:
keys
- the keys to consider to decrypt the recipient content encryption key- Returns:
- a JWS publisher for validating the recipient JWS
- Throws:
JWSReadException
- if there was an error reading the recipient JWSJWSBuildException
- if there was an error building the recipient JWSJOSEObjectReadException
- if there was a JOSE object reading errorJOSEObjectBuildException
- if there was a JOSE object building errorJOSEProcessingException
- if there was a JOSE processing error
-