@Immutable public class JWERecipient extends Object
This class is immutable.
See https://datatracker.ietf.org/doc/html/rfc7516#section-7.2
Constructor and Description |
---|
JWERecipient(UnprotectedHeader header,
Base64URL encryptedKey)
Creates a new JWE recipient.
|
Modifier and Type | Method and Description |
---|---|
Base64URL |
getEncryptedKey()
Returns the encrypted key for this JWE recipient.
|
UnprotectedHeader |
getHeader()
Returns the unprotected header for this JWE recipient.
|
static JWERecipient |
parse(Map<String,Object> jsonObject)
Parses a JWE recipient from the specified JSON object.
|
static List<JWERecipient> |
parse(Map<String,Object>[] jsonArray)
Parses a JSON array of JWE recipient JSON objects.
|
Map<String,Object> |
toJSONObject()
Returns a JSON object representation.
|
public JWERecipient(UnprotectedHeader header, Base64URL encryptedKey)
header
- The unprotected header, null
if not
specified.encryptedKey
- The encrypted key, null
if not
specified.public UnprotectedHeader getHeader()
null
if not specified.public Base64URL getEncryptedKey()
null
if not specified.public Map<String,Object> toJSONObject()
public static JWERecipient parse(Map<String,Object> jsonObject) throws ParseException
jsonObject
- The JSON object to parse. Must not be
null
.ParseException
- If parsing failed.public static List<JWERecipient> parse(Map<String,Object>[] jsonArray) throws ParseException
jsonArray
- The JSON array to parse. Must not be null
.ParseException
- If parsing failed.Copyright © 2021 Connect2id Ltd.. All rights reserved.