Class JWEObjectJSON.Recipient

java.lang.Object
com.nimbusds.jose.JWEObjectJSON.Recipient
Enclosing class:
JWEObjectJSON

@Immutable public static final class JWEObjectJSON.Recipient extends Object
Individual recipient in a JWE object serialisable to JSON.
  • Constructor Details

    • Recipient

      public Recipient(UnprotectedHeader unprotectedHeader, Base64URL encryptedKey)
      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

      public static JWEObjectJSON.Recipient parse(Map<String,Object> jsonObject) throws ParseException
      Parses a recipients object from the specified JSON object.
      Parameters:
      jsonObject - The JSON object to parse. Must not be null.
      Returns:
      The recipient object.
      Throws:
      ParseException - If the string couldn't be parsed to a JWE object.