Class JsonWebSignature.Header (1.42.3)

public static class JsonWebSignature.Header extends JsonWebToken.Header

Header as specified in Reserved Header Parameter Names.

Inheritance

Object > AbstractMap > GenericData > GenericJson > JsonWebToken.Header > JsonWebSignature.Header

Constructors

Header()

public Header()

Methods

clone()

public JsonWebSignature.Header clone()

Makes a "deep" clone of the generic data, in which the clone is completely independent of the original.

Returns
TypeDescription
JsonWebSignature.Header
Overrides

getAlgorithm()

public final String getAlgorithm()

Returns the algorithm header parameter that identifies the cryptographic algorithm used to secure the JWS or null for none.

Returns
TypeDescription
String

getCritical()

public final List<String> getCritical()

Returns an array listing the header parameter names that define extensions used in the JWS header that MUST be understood and processed or null for none.

Returns
TypeDescription
List<String>

getJwk()

public final String getJwk()

Returns the JSON Web Key header parameter that is a public key that corresponds to the key used to digitally sign the JWS or null for none.

Returns
TypeDescription
String

getJwkUrl()

public final String getJwkUrl()

Returns the JSON Web Key URL header parameter that is an absolute URL that refers to a resource for a set of JSON-encoded public keys, one of which corresponds to the key that was used to digitally sign the JWS or null for none.

Returns
TypeDescription
String

getKeyId()

public final String getKeyId()

Returns the key ID header parameter that is a hint indicating which specific key owned by the signer should be used to validate the digital signature or null for none.

Returns
TypeDescription
String

getX509Certificates()

public final List<String> getX509Certificates()

Returns the X.509 certificate chain header parameter contains the X.509 public key certificate or certificate chain corresponding to the key used to digitally sign the JWS or null for none.

Returns
TypeDescription
List<String>

getX509Thumbprint()

public final String getX509Thumbprint()

Returns the X.509 certificate thumbprint header parameter that provides a base64url encoded SHA-1 thumbprint (a.k.a. digest) of the DER encoding of an X.509 certificate that can be used to match the certificate or null for none.

Returns
TypeDescription
String

getX509Url()

public final String getX509Url()

Returns the X.509 URL header parameter that is an absolute URL 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 or null for none.

Returns
TypeDescription
String

set(String fieldName, Object value)

public JsonWebSignature.Header set(String fieldName, Object value)

Sets the given field value (may be null) for the given field name. Any existing value for the field will be overwritten. It may be more slightly more efficient than #put(String, Object) because it avoids accessing the field's original value.

Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.

Parameters
NameDescription
fieldNameString
valueObject
Returns
TypeDescription
JsonWebSignature.Header
Overrides

setAlgorithm(String algorithm)

public JsonWebSignature.Header setAlgorithm(String algorithm)

Sets the algorithm header parameter that identifies the cryptographic algorithm used to secure the JWS or null for none.

Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.

Parameter
NameDescription
algorithmString
Returns
TypeDescription
JsonWebSignature.Header

setCritical(List<String> critical)

public JsonWebSignature.Header setCritical(List<String> critical)

Sets the header parameter names that define extensions used in the JWS header that MUST be understood and processed or null for none.

Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.

Parameter
NameDescription
criticalList<String>
Returns
TypeDescription
JsonWebSignature.Header

setJwk(String jwk)

public JsonWebSignature.Header setJwk(String jwk)

Sets the JSON Web Key header parameter that is a public key that corresponds to the key used to digitally sign the JWS or null for none.

Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.

Parameter
NameDescription
jwkString
Returns
TypeDescription
JsonWebSignature.Header

setJwkUrl(String jwkUrl)

public JsonWebSignature.Header setJwkUrl(String jwkUrl)

Sets the JSON Web Key URL header parameter that is an absolute URL that refers to a resource for a set of JSON-encoded public keys, one of which corresponds to the key that was used to digitally sign the JWS or null for none.

Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.

Parameter
NameDescription
jwkUrlString
Returns
TypeDescription
JsonWebSignature.Header

setKeyId(String keyId)

public JsonWebSignature.Header setKeyId(String keyId)

Sets the key ID header parameter that is a hint indicating which specific key owned by the signer should be used to validate the digital signature or null for none.

Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.

Parameter
NameDescription
keyIdString
Returns
TypeDescription
JsonWebSignature.Header

setType(String type)

public JsonWebSignature.Header setType(String type)

Sets the type header parameter used to declare the type of this object or null for none.

Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.

Parameter
NameDescription
typeString
Returns
TypeDescription
JsonWebSignature.Header
Overrides

setX509Certificates(List<String> x509Certificates)

public JsonWebSignature.Header setX509Certificates(List<String> x509Certificates)

Sets the X.509 certificate chain header parameter contains the X.509 public key certificate or certificate chain corresponding to the key used to digitally sign the JWS or null for none.

Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.

Parameter
NameDescription
x509CertificatesList<String>
Returns
TypeDescription
JsonWebSignature.Header

setX509Thumbprint(String x509Thumbprint)

public JsonWebSignature.Header setX509Thumbprint(String x509Thumbprint)

Sets the X.509 certificate thumbprint header parameter that provides a base64url encoded SHA-1 thumbprint (a.k.a. digest) of the DER encoding of an X.509 certificate that can be used to match the certificate or null for none.

Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.

Parameter
NameDescription
x509ThumbprintString
Returns
TypeDescription
JsonWebSignature.Header

setX509Url(String x509Url)

public JsonWebSignature.Header setX509Url(String x509Url)

Sets the X.509 URL header parameter that is an absolute URL 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 or null for none.

Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.

Parameter
NameDescription
x509UrlString
Returns
TypeDescription
JsonWebSignature.Header