Package com.nimbusds.jose
Class JWEObjectJSON.Recipient
java.lang.Object
com.nimbusds.jose.JWEObjectJSON.Recipient
- Enclosing class:
- JWEObjectJSON
Individual recipient in a JWE object serialisable to JSON.
-
Constructor Summary
ConstructorsConstructorDescriptionRecipient
(UnprotectedHeader unprotectedHeader, Base64URL encryptedKey) Creates a new parsed recipient. -
Method Summary
Modifier and TypeMethodDescriptionReturns the encrypted key.Returns the per-recipient unprotected header.static JWEObjectJSON.Recipient
Parses a recipients object from the specified JSON object.Returns a JSON object representation for use in the general and flattened serialisations.
-
Constructor Details
-
Recipient
Creates a new parsed recipient.- Parameters:
unprotectedHeader
- The per-recipient unprotected header,null
if none.encryptedKey
- The encrypted key,null
if none.
-
-
Method Details
-
getUnprotectedHeader
Returns the per-recipient unprotected header.- Returns:
- The per-recipient unprotected header,
null
if none.
-
getEncryptedKey
Returns the encrypted key.- Returns:
- The encryptedKey.
-
toJSONObject
Returns a JSON object representation for use in the general and flattened serialisations.- Returns:
- The JSON object.
-
parse
Parses a recipients object from the specified JSON object.- Parameters:
jsonObject
- The JSON object to parse. Must not benull
.- Returns:
- The recipient object.
- Throws:
ParseException
- If the string couldn't be parsed to a JWE object.
-