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.
|
JweAlgorithm |
getAlgorithm()
Gets the Algorithm set in the JWT header.
|
EncryptionMethod |
getEncryptionMethod()
Gets the Encryption Method header parameter for this JWE.
|
String |
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 |
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, setX509Urlbuild, getAlgorithmString, getParameter, getParameters, getType, setAlgorithm, setParameters, setTypecheckListValuesAreOfType, checkValueIsOfType, get, isDefined, isValueOfType, keys, put, toStringpublic JweAlgorithm getAlgorithm()
If there is no algorithm set in the JWT header, then the JweAlgorithm NONE will be returned.
getAlgorithm in class JwtHeaderpublic 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 String getEphemeralPublicKey()
public void setAgreementPartyUInfo(String agreementPartyUInfo)
For use with key agreement algorithms (such as "ECDH-ES"), represented as a base64url encoded string.
This method will perform the base64url encoding so the agreementPartyUInfo must be the un-encoded String value of the Agreement PartyUInfo.
agreementPartyUInfo - The Agreement PartyUInfo.public String getAgreementPartyUInfo()
public void setParameter(String key, Object value)
JwtSecureHeaderIf 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 JwtSecureHeaderkey - The key of the header parameter.value - The value of the header parameter.public Object getParameter(String key)
JwtSecureHeaderIf 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 JwtSecureHeaderkey - The header parameter key.Copyright © 2025 Open Identity Platform Community. All rights reserved.