Constructor and Description |
---|
JwtSecureHeader()
Constructs a new, empty JwtSecureHeader.
|
JwtSecureHeader(Map<String,Object> headers)
Constructs a new JwtSecureHeader, with its parameters set to the contents of the given Map.
|
Modifier and Type | Method and Description |
---|---|
CompressionAlgorithm |
getCompressionAlgorithm()
Gets the Compression Algorithm header parameter for this JWE.
|
String |
getContentType()
Gets the content type header parameter for this JWS.
|
List<String> |
getCriticalHeaders()
Gets the critical header parameters for this JWS.
|
JWK |
getJsonWebKey()
Gets the JSON Web Key header parameter for this JWS.
|
URL |
getJwkSetUrl()
Gets the JWK Set URL header parameter for this JWS.
|
String |
getKeyId()
Gets the Key ID header parameter for this JWS.
|
Object |
getParameter(String key)
Gets a header parameter for the specified key.
|
List<String> |
getX509CertificateChain()
Gets the X.509 Certificate Chain header parameter for this JWS.
|
String |
getX509CertificateThumbprint()
Gets the X.509 Certificate Thumbprint header parameter for this JWS.
|
URL |
getX509Url()
Gets the X.509 URL header parameter for this JWS.
|
void |
setCompressionAlgorithm(CompressionAlgorithm compressionAlgorithm)
Sets the Compression Algorithm header parameter for this JWE.
|
void |
setContentType(String contentType)
Sets the content type header parameter for this JWS.
|
void |
setCriticalHeaders(List<String> criticalHeaders)
Sets the critical header parameters for this JWS.
|
void |
setJsonWebKey(JWK jsonWebKey)
Sets the JSON Web Key header parameter for this JWS.
|
void |
setJwkSetUrl(URL jwkSetUrl)
Sets the JWK Set URL header parameter for this JWS.
|
void |
setKeyId(String keyId)
Sets the Key ID header parameter for this JWS.
|
void |
setParameter(String key,
Object value)
Sets a header parameter with the specified key and value.
|
void |
setX509CertificateChain(List<String> x509CertificateChain)
Sets the X.509 Certificate Chain header parameter for this JWS.
|
void |
setX509CertificateThumbprint(String x509CertificateThumbprint)
Sets the X.509 Certificate Thumbprint header parameter for this JWS.
|
void |
setX509Url(URL x509Url)
Sets the X.509 URL header parameter for this JWS.
|
build, getAlgorithm, getAlgorithmString, getParameter, getParameters, getType, setAlgorithm, setParameters, setType
checkListValuesAreOfType, checkValueIsOfType, get, isDefined, isValueOfType, keys, put, toJsonValue, toString
public JwtSecureHeader()
public void setJwkSetUrl(URL jwkSetUrl)
A URI that refers to a resource for a set of JSON-encoded public keys, one of which corresponds to the key used to digitally sign the JWS.
The keys MUST be encoded as a JSON Web Key Set (JWK Set).
The protocol used to acquire the resource MUST provide integrity protection and the identity of the server MUST be validated.
jwkSetUrl
- The JWK Set URL.public URL getJwkSetUrl()
public void setJsonWebKey(JWK jsonWebKey)
The public key that corresponds to the key used to digitally sign the JWS. This key is represented as a JSON Web Key (JWK).
jsonWebKey
- The JSON Web Key.public JWK getJsonWebKey()
public void setX509Url(URL x509Url)
A URI that refers to a resource for the X.509 public key certificate or certificate chain corresponding to the key used to digitally sign the JWS.
The certificate containing the public key corresponding to the key used to digitally sign the JWS MUST be the first certificate. This MAY be followed by additional certificates, with each subsequent certificate being the one used to certify the previous one.
The protocol used to acquire the resource MUST provide integrity protection and the identity of the server MUST be validated.
x509Url
- The X.509 URL.public URL getX509Url()
public void setX509CertificateThumbprint(String x509CertificateThumbprint)
A base64url encoded SHA-1 thumbprint (a.k.a. digest) of the DER encoding of the X.509 certificate corresponding to the key used to digitally sign the JWS.
This method will perform the base64url encoding so the x509CertificateThumbprint must be the SHA-1 digest.
x509CertificateThumbprint
- The X.509 Certificate Thumbprint.public String getX509CertificateThumbprint()
public void setX509CertificateChain(List<String> x509CertificateChain)
Contains the list of X.509 public key certificate or certificate chain corresponding to the key used to digitally sign the JWS. Each entry in the list is a base64 encoded DER PKIX certificate value. This method will perform the base64 encoding of each entry so the entries in the list must be the DER PKIX certificate values.
The certificate containing the public key corresponding to the key used to digitally sign the JWS MUST be the first certificate. This MAY be followed by additional certificates, with each subsequent certificate being the one used to certify the previous one.
x509CertificateChain
- The X.509 Certificate Chain.public List<String> getX509CertificateChain()
public void setKeyId(String keyId)
Indicates which key was used to secure the JWS, allowing originators to explicitly signal a change of key to recipients.
keyId
- The Key ID.public String getKeyId()
public void setContentType(String contentType)
Declares the type of the secured content (the Payload).
contentType
- The content type of this JWS' payload.public String getContentType()
public void setCriticalHeaders(List<String> criticalHeaders)
This header parameter indicates that extensions to the JWS specification are being used that MUST be understood and processed.
The criticalHeaders parameter cannot be an empty list.
criticalHeaders
- A List of the critical parameters.public List<String> getCriticalHeaders()
public void setParameter(String key, Object value)
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 JwtHeader
key
- The key of the header parameter.value
- The value of the header parameter.public Object getParameter(String key)
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 JwtHeader
key
- The header parameter key.public void setCompressionAlgorithm(CompressionAlgorithm compressionAlgorithm)
If present, the value of the Compression Algorithm header parameter MUST be CompressionAlgorithm constant DEF.
compressionAlgorithm
- The Compression Algorithm.public CompressionAlgorithm getCompressionAlgorithm()
Copyright © 2010-2018, ForgeRock All Rights Reserved.