public class JweHeader extends JwtSecureHeader
Constructor and Description |
---|
JweHeader()
Constructs an new, empty JweHeader.
|
JweHeader(Map<String,Object> headerParameters)
Constructs a new JweHeader with its parameters set to the contents of the given Map.
|
Modifier and Type | Method and Description |
---|---|
String |
getAgreementPartyUInfo()
Gets the Agreement PartyUInfo header parameter for this JWE.
|
String |
getAgreementPartyVInfo()
Gets the Agreement PartyVInfo header parameter for this JWE.
|
JweAlgorithm |
getAlgorithm()
Gets the Algorithm set in the JWT header.
|
EncryptionMethod |
getEncryptionMethod()
Gets the Encryption Method header parameter for this JWE.
|
JWK |
getEphemeralPublicKey()
Gets the Ephemeral Public Key header parameter for this JWE.
|
Object |
getParameter(String key)
Gets a header parameter for the specified key.
|
void |
setAgreementPartyUInfo(String agreementPartyUInfo)
Sets the Agreement PartyUInfo header parameter for this JWE.
|
void |
setAgreementPartyVInfo(String agreementPartyVInfo)
Sets the Agreement PartyVInfo header parameter for this JWE.
|
void |
setEncryptionMethod(EncryptionMethod encryptionMethod)
Sets the Encryption Method header parameter for this JWE.
|
void |
setEphemeralPublicKey(JWK ephemeralPublicKey)
Sets the Ephemeral Public Key header parameter for this JWE.
|
void |
setParameter(String key,
Object value)
Sets a header parameter with the specified key and value.
|
getCompressionAlgorithm, getContentType, getCriticalHeaders, getJsonWebKey, getJwkSetUrl, getKeyId, getX509CertificateChain, getX509CertificateThumbprint, getX509Url, setCompressionAlgorithm, setContentType, setCriticalHeaders, setJsonWebKey, setJwkSetUrl, setKeyId, setX509CertificateChain, setX509CertificateThumbprint, setX509Url
build, getAlgorithmString, getParameter, getParameters, getType, setAlgorithm, setParameters, setType
checkListValuesAreOfType, checkValueIsOfType, get, isDefined, isValueOfType, keys, put, toJsonValue, toString
public JweAlgorithm getAlgorithm()
If there is no algorithm set in the JWT header, then the JweAlgorithm NONE will be returned.
getAlgorithm
in class JwtHeader
public void setEncryptionMethod(EncryptionMethod encryptionMethod)
Identifies the block encryption algorithm used to encrypt the Plaintext to produce the Ciphertext.
encryptionMethod
- The Encryption Method.public EncryptionMethod getEncryptionMethod()
public void setEphemeralPublicKey(JWK ephemeralPublicKey)
For use in key agreement algorithms. When the Algorithm header parameter value specified identifies an algorithm for which "epk" is a parameter, this parameter MUST be present if REQUIRED by the algorithm.
ephemeralPublicKey
- The Ephemeral Public Key.public JWK getEphemeralPublicKey()
public void setAgreementPartyUInfo(String agreementPartyUInfo)
For use with key agreement algorithms (such as "ECDH-ES"), represented as a base64url encoded string.
agreementPartyUInfo
- The Agreement PartyUInfo.public String getAgreementPartyUInfo()
public void setAgreementPartyVInfo(String agreementPartyVInfo)
For use with key agreement algorithms (such as "ECDH-ES"), represented as a base64url encoded string.
agreementPartyVInfo
- The Agreement PartyVInfo.public String getAgreementPartyVInfo()
public void setParameter(String key, Object value)
JwtSecureHeader
If the key matches one of the reserved header parameter names, then the relevant set method is called to set that header parameter with the specified value.
setParameter
in class JwtSecureHeader
key
- The key of the header parameter.value
- The value of the header parameter.public Object getParameter(String key)
JwtSecureHeader
If the key matches one of the reserved header parameter names, then the relevant get method is called to get that header parameter.
getParameter
in class JwtSecureHeader
key
- The header parameter key.Copyright © 2010-2018, ForgeRock All Rights Reserved.