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