Module io.inverno.mod.security.jose
Class GenericJWSHeader
java.lang.Object
io.inverno.mod.security.jose.internal.AbstractJOSEHeader<GenericJWSHeader>
io.inverno.mod.security.jose.internal.jws.GenericJWSHeader
- All Implemented Interfaces:
JOSEHeader,JOSEHeaderConfigurator<GenericJWSHeader>,JWSHeader,JWSHeaderConfigurator<GenericJWSHeader>
- Direct Known Subclasses:
JsonJWSHeader
public class GenericJWSHeader
extends AbstractJOSEHeader<GenericJWSHeader>
implements JWSHeader, JWSHeaderConfigurator<GenericJWSHeader>
Generic JWS header implementation.
It processed the following parameters: b64, alg, jku, jwk, kid, x5u, x5c, x5t, x5t#S256, typ, cty, crit
- Since:
- 1.5
- Author:
- Jeremy Kuhn
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected BooleanThe base64url-encode payload parameter as defined by RFC7797 Section 3.The set of parameters processed in the JWS header. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a generic JWS header.GenericJWSHeader(String alg) Creates a generic JWS header. -
Method Summary
Modifier and TypeMethodDescriptionSpecifies whether the payload should be encoded as Base64URL or processed unencoded.booleanReturns the parameters processed by the JOSE header.inthashCode()Determines whether the payload should be encoded as Base64URL or processed and serialized unencoded as defined by RFC7797 Section 5.Methods inherited from class io.inverno.mod.security.jose.internal.AbstractJOSEHeader
addCustomParameter, algorithm, contentType, critical, getAlgorithm, getContentType, getCritical, getCustomParameters, getEncoded, getJWK, getJWKSetURL, getKey, getKeyId, getType, getX509CertificateChain, getX509CertificateSHA1Thumbprint, getX509CertificateSHA256Thumbprint, getX509CertificateURL, jwk, jwkSetURL, keyId, setEncoded, setKey, type, x509CertificateChain, x509CertificateSHA1Thumbprint, x509CertificateSHA256Thumbprint, x509CertificateURLMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.inverno.mod.security.jose.JOSEHeader
getAlgorithm, getContentType, getCritical, getCustomParameters, getEncoded, getJWK, getJWKSetURL, getKey, getKeyId, getType, getX509CertificateChain, getX509CertificateSHA1Thumbprint, getX509CertificateSHA256Thumbprint, getX509CertificateURLMethods inherited from interface io.inverno.mod.security.jose.JOSEHeaderConfigurator
addCustomParameter, algorithm, contentType, critical, jwk, jwkSetURL, keyId, type, x509CertificateChain, x509CertificateSHA1Thumbprint, x509CertificateSHA256Thumbprint, x509CertificateURL
-
Field Details
-
PROCESSED_PARAMETERS
The set of parameters processed in the JWS header. -
b64
The base64url-encode payload parameter as defined by RFC7797 Section 3.
-
-
Constructor Details
-
GenericJWSHeader
public GenericJWSHeader()Creates a generic JWS header.
-
GenericJWSHeader
Creates a generic JWS header.
- Parameters:
alg- the signature JWA algorithm
-
-
Method Details
-
getProcessedParameters
Description copied from class:AbstractJOSEHeaderReturns the parameters processed by the JOSE header.
- Overrides:
getProcessedParametersin classAbstractJOSEHeader<GenericJWSHeader>- Returns:
- a set of processed parameters
-
isBase64EncodePayload
Description copied from interface:JWSHeaderDetermines whether the payload should be encoded as Base64URL or processed and serialized unencoded as defined by RFC7797 Section 5.
- Specified by:
isBase64EncodePayloadin interfaceJWSHeader- Returns:
- true or null if the payload must be encoded as Base64URL, false otherwise
-
base64EncodePayload
Description copied from interface:JWSHeaderConfiguratorSpecifies whether the payload should be encoded as Base64URL or processed unencoded.
- Specified by:
base64EncodePayloadin interfaceJWSHeaderConfigurator<GenericJWSHeader>- Parameters:
b64- true or null to encode the payload as Base64URL, false otherwise- Returns:
- this builder
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceJOSEHeader- Specified by:
hashCodein interfaceJWSHeader- Overrides:
hashCodein classAbstractJOSEHeader<GenericJWSHeader>
-
equals
- Specified by:
equalsin interfaceJOSEHeader- Specified by:
equalsin interfaceJWSHeader- Overrides:
equalsin classAbstractJOSEHeader<GenericJWSHeader>
-