Class JsonWebSignature.Header
- java.lang.Object
-
- java.util.AbstractMap<java.lang.String,java.lang.Object>
-
- com.google.api.client.util.GenericData
-
- com.google.api.client.json.GenericJson
-
- com.google.api.client.json.webtoken.JsonWebToken.Header
-
- com.google.api.client.json.webtoken.JsonWebSignature.Header
-
- All Implemented Interfaces:
java.lang.Cloneable,java.util.Map<java.lang.String,java.lang.Object>
- Enclosing class:
- JsonWebSignature
public static class JsonWebSignature.Header extends JsonWebToken.Header
Header as specified in Reserved Header Parameter Names.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.api.client.util.GenericData
GenericData.Flags
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringalgorithmAlgorithm header parameter that identifies the cryptographic algorithm used to secure the JWS ornullfor none.private java.util.List<java.lang.String>criticalArray listing the header parameter names that define extensions that are used in the JWS header that MUST be understood and processed ornullfor none.private java.lang.StringjwkJSON Web Key header parameter that is a public key that corresponds to the key used to digitally sign the JWS ornullfor none.private java.lang.StringjwkUrlJSON 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 ornullfor none.private java.lang.StringkeyIdKey ID header parameter that is a hint indicating which specific key owned by the signer should be used to validate the digital signature ornullfor none.private java.util.ArrayList<java.lang.String>x509CertificatesX.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 ornullfor none.private java.lang.Stringx509ThumbprintX.509 certificate thumbprint header parameter that provides a base64url encoded SHA-1 thumbprint (a.k.a.private java.lang.Stringx509UrlX.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 ornullfor none.
-
Constructor Summary
Constructors Constructor Description Header()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JsonWebSignature.Headerclone()Makes a "deep" clone of the generic data, in which the clone is completely independent of the original.java.lang.StringgetAlgorithm()Returns the algorithm header parameter that identifies the cryptographic algorithm used to secure the JWS ornullfor none.java.util.List<java.lang.String>getCritical()Returns an array listing the header parameter names that define extensions used in the JWS header that MUST be understood and processed ornullfor none.java.lang.StringgetJwk()Returns the JSON Web Key header parameter that is a public key that corresponds to the key used to digitally sign the JWS ornullfor none.java.lang.StringgetJwkUrl()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 ornullfor none.java.lang.StringgetKeyId()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 ornullfor none.java.util.List<java.lang.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 ornullfor none.java.lang.StringgetX509Thumbprint()Returns the X.509 certificate thumbprint header parameter that provides a base64url encoded SHA-1 thumbprint (a.k.a.java.lang.StringgetX509Url()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 ornullfor none.JsonWebSignature.Headerset(java.lang.String fieldName, java.lang.Object value)Sets the given field value (may benull) for the given field name.JsonWebSignature.HeadersetAlgorithm(java.lang.String algorithm)Sets the algorithm header parameter that identifies the cryptographic algorithm used to secure the JWS ornullfor none.JsonWebSignature.HeadersetCritical(java.util.List<java.lang.String> critical)Sets the header parameter names that define extensions used in the JWS header that MUST be understood and processed ornullfor none.JsonWebSignature.HeadersetJwk(java.lang.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 ornullfor none.JsonWebSignature.HeadersetJwkUrl(java.lang.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 ornullfor none.JsonWebSignature.HeadersetKeyId(java.lang.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 ornullfor none.JsonWebSignature.HeadersetType(java.lang.String type)Sets the type header parameter used to declare the type of this object ornullfor none.JsonWebSignature.HeadersetX509Certificates(java.util.List<java.lang.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 ornullfor none.JsonWebSignature.HeadersetX509Thumbprint(java.lang.String x509Thumbprint)Sets the X.509 certificate thumbprint header parameter that provides a base64url encoded SHA-1 thumbprint (a.k.a.JsonWebSignature.HeadersetX509Url(java.lang.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 ornullfor none.-
Methods inherited from class com.google.api.client.json.webtoken.JsonWebToken.Header
getContentType, getType, setContentType
-
Methods inherited from class com.google.api.client.json.GenericJson
getFactory, setFactory, toPrettyString, toString
-
Methods inherited from class com.google.api.client.util.GenericData
entrySet, equals, get, getClassInfo, getUnknownKeys, hashCode, put, putAll, remove, setUnknownKeys
-
Methods inherited from class java.util.AbstractMap
clear, containsKey, containsValue, isEmpty, keySet, size, values
-
-
-
-
Field Detail
-
algorithm
private java.lang.String algorithm
Algorithm header parameter that identifies the cryptographic algorithm used to secure the JWS ornullfor none.
-
jwkUrl
private java.lang.String jwkUrl
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 ornullfor none.
-
jwk
private java.lang.String jwk
JSON Web Key header parameter that is a public key that corresponds to the key used to digitally sign the JWS ornullfor none.
-
keyId
private java.lang.String keyId
Key ID header parameter that is a hint indicating which specific key owned by the signer should be used to validate the digital signature ornullfor none.
-
x509Url
private java.lang.String x509Url
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 ornullfor none.
-
x509Thumbprint
private java.lang.String x509Thumbprint
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 ornullfor none.
-
x509Certificates
private java.util.ArrayList<java.lang.String> x509Certificates
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 ornullfor none.- Since:
- 1.19.1.
-
critical
private java.util.List<java.lang.String> critical
Array listing the header parameter names that define extensions that are used in the JWS header that MUST be understood and processed ornullfor none.
-
-
Method Detail
-
setType
public JsonWebSignature.Header setType(java.lang.String type)
Description copied from class:JsonWebToken.HeaderSets the type header parameter used to declare the type of this object ornullfor none.Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
- Overrides:
setTypein classJsonWebToken.Header
-
getAlgorithm
public final java.lang.String getAlgorithm()
Returns the algorithm header parameter that identifies the cryptographic algorithm used to secure the JWS ornullfor none.
-
setAlgorithm
public JsonWebSignature.Header setAlgorithm(java.lang.String algorithm)
Sets the algorithm header parameter that identifies the cryptographic algorithm used to secure the JWS ornullfor none.Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
-
getJwkUrl
public final java.lang.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 ornullfor none.
-
setJwkUrl
public JsonWebSignature.Header setJwkUrl(java.lang.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 ornullfor none.Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
-
getJwk
public final java.lang.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 ornullfor none.
-
setJwk
public JsonWebSignature.Header setJwk(java.lang.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 ornullfor none.Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
-
getKeyId
public final java.lang.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 ornullfor none.
-
setKeyId
public JsonWebSignature.Header setKeyId(java.lang.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 ornullfor none.Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
-
getX509Url
public final java.lang.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 ornullfor none.
-
setX509Url
public JsonWebSignature.Header setX509Url(java.lang.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 ornullfor none.Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
-
getX509Thumbprint
public final java.lang.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 ornullfor none.
-
setX509Thumbprint
public JsonWebSignature.Header setX509Thumbprint(java.lang.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 ornullfor none.Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
-
getX509Certificates
public final java.util.List<java.lang.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 ornullfor none.- Since:
- 1.19.1.
-
setX509Certificates
public JsonWebSignature.Header setX509Certificates(java.util.List<java.lang.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 ornullfor none.Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
- Since:
- 1.19.1.
-
getCritical
public final java.util.List<java.lang.String> getCritical()
Returns an array listing the header parameter names that define extensions used in the JWS header that MUST be understood and processed ornullfor none.- Since:
- 1.16
-
setCritical
public JsonWebSignature.Header setCritical(java.util.List<java.lang.String> critical)
Sets the header parameter names that define extensions used in the JWS header that MUST be understood and processed ornullfor none.Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
- Since:
- 1.16
-
set
public JsonWebSignature.Header set(java.lang.String fieldName, java.lang.Object value)
Description copied from class:GenericDataSets the given field value (may benull) for the given field name. Any existing value for the field will be overwritten. It may be more slightly more efficient thanGenericData.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.
- Overrides:
setin classJsonWebToken.Header
-
clone
public JsonWebSignature.Header clone()
Description copied from class:GenericDataMakes a "deep" clone of the generic data, in which the clone is completely independent of the original.- Overrides:
clonein classJsonWebToken.Header
-
-