Class JwsHeader.Builder
java.lang.Object
org.springframework.security.oauth2.jwt.JwsHeader.Builder
- Enclosing class:
- JwsHeader
A builder for 
JwsHeader.- 
Method SummaryModifier and TypeMethodDescriptionalgorithm(JwaAlgorithm jwaAlgorithm) Sets theJWA algorithmused to digitally sign the JWS or encrypt the JWE.build()Builds a newJwsHeader.contentType(String contentType) Sets the content type header that declares the media type of the secured content (the payload).criticalHeader(String name, Object value) Sets the critical header that indicates which extensions to the JWS/JWE/JWA specifications are being used that MUST be understood and processed.protected final JwsHeader.BuildergetThis()Sets the header.AConsumerto be provided access to the headers allowing the ability to add, replace, or remove.Sets the JSON Web Key which is the public key that corresponds to the key used to digitally sign the JWS or encrypt the JWE.Sets the JWK Set URL that refers to the resource of a set of JSON-encoded public keys, one of which corresponds to the key used to digitally sign the JWS or encrypt the JWE.Sets the key ID that is a hint indicating which key was used to secure the JWS or JWE.Sets the type header that declares the media type of the JWS/JWE.x509CertificateChain(List<String> x509CertificateChain) Sets the X.509 certificate chain that contains the X.509 public key certificate or certificate chain corresponding to the key used to digitally sign the JWS or encrypt the JWE.x509SHA1Thumbprint(String x509SHA1Thumbprint) Sets the X.509 certificate SHA-1 thumbprint that is a base64url-encoded SHA-1 thumbprint (a.k.a.x509SHA256Thumbprint(String x509SHA256Thumbprint) Sets the X.509 certificate SHA-256 thumbprint that is a base64url-encoded SHA-256 thumbprint (a.k.a.Sets the X.509 URL that refers to the resource for the X.509 public key certificate or certificate chain corresponding to the key used to digitally sign the JWS or encrypt the JWE.
- 
Method Details- 
buildBuilds a newJwsHeader.- Returns:
- a JwsHeader
 
- 
getHeaders
- 
getThis
- 
algorithmSets theJWA algorithmused to digitally sign the JWS or encrypt the JWE.- Parameters:
- jwaAlgorithm- the- JwaAlgorithm
- Returns:
- the JoseHeader.AbstractBuilder
 
- 
jwkSetUrlSets the JWK Set URL that refers to the resource of a set of JSON-encoded public keys, one of which corresponds to the key used to digitally sign the JWS or encrypt the JWE.- Parameters:
- jwkSetUrl- the JWK Set URL
- Returns:
- the JoseHeader.AbstractBuilder
 
- 
jwkSets the JSON Web Key which is the public key that corresponds to the key used to digitally sign the JWS or encrypt the JWE.- Parameters:
- jwk- the JSON Web Key
- Returns:
- the JoseHeader.AbstractBuilder
 
- 
keyIdSets the key ID that is a hint indicating which key was used to secure the JWS or JWE.- Parameters:
- keyId- the key ID
- Returns:
- the JoseHeader.AbstractBuilder
 
- 
x509UrlSets the X.509 URL that refers to the resource for the X.509 public key certificate or certificate chain corresponding to the key used to digitally sign the JWS or encrypt the JWE.- Parameters:
- x509Url- the X.509 URL
- Returns:
- the JoseHeader.AbstractBuilder
 
- 
x509CertificateChainSets the X.509 certificate chain that contains the X.509 public key certificate or certificate chain corresponding to the key used to digitally sign the JWS or encrypt the JWE. The certificate or certificate chain is represented as aListof certificate valueStrings. EachStringin theListis a Base64-encoded DER PKIX certificate value.- Parameters:
- x509CertificateChain- the X.509 certificate chain
- Returns:
- the JoseHeader.AbstractBuilder
 
- 
x509SHA1ThumbprintSets the X.509 certificate SHA-1 thumbprint that is 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 or encrypt the JWE.- Parameters:
- x509SHA1Thumbprint- the X.509 certificate SHA-1 thumbprint
- Returns:
- the JoseHeader.AbstractBuilder
 
- 
x509SHA256ThumbprintSets the X.509 certificate SHA-256 thumbprint that is a base64url-encoded SHA-256 thumbprint (a.k.a. digest) of the DER encoding of the X.509 certificate corresponding to the key used to digitally sign the JWS or encrypt the JWE.- Parameters:
- x509SHA256Thumbprint- the X.509 certificate SHA-256 thumbprint
- Returns:
- the JoseHeader.AbstractBuilder
 
- 
typeSets the type header that declares the media type of the JWS/JWE.- Parameters:
- type- the type header
- Returns:
- the JoseHeader.AbstractBuilder
 
- 
contentTypeSets the content type header that declares the media type of the secured content (the payload).- Parameters:
- contentType- the content type header
- Returns:
- the JoseHeader.AbstractBuilder
 
- 
criticalHeaderSets the critical header that indicates which extensions to the JWS/JWE/JWA specifications are being used that MUST be understood and processed.- Parameters:
- name- the critical header name
- value- the critical header value
- Returns:
- the JoseHeader.AbstractBuilder
 
- 
headerSets the header.- Parameters:
- name- the header name
- value- the header value
- Returns:
- the JoseHeader.AbstractBuilder
 
- 
headersAConsumerto be provided access to the headers allowing the ability to add, replace, or remove.- Parameters:
- headersConsumer- a- Consumerof the headers
- Returns:
- the JoseHeader.AbstractBuilder
 
 
-