Record Class JWSCompactSerialization
java.lang.Object
java.lang.Record
de.christofreichardt.json.websignature.JWSCompactSerialization
- Record Components:
encodedHeader- the BASE64 URL encoded JOSE header.encodedPayload- the BASE64 URL encoded payload.encodedSignature- the BASE64 URL encoded signature.
-
Constructor Summary
ConstructorsConstructorDescriptionJWSCompactSerialization(String encodedHeader, String encodedPayload, String encodedSignature) Creates an instance of aJWSCompactSerializationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theencodedHeaderrecord component.Returns the value of theencodedPayloadrecord component.Returns the value of theencodedSignaturerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.jakarta.json.JsonObjectDecodes the BASE64 URL encoded JOSE header and constructs an appropriateJsonObject.static JWSCompactSerializationFactory method which expects an actual compact serialization format.jakarta.json.JsonObjectpayload()Decodes the BASE64 URL encoded payload and constructs an appropriateJsonObject.Returns the decoded (protected) JOSE header.Returns the decoded payload.toString()Returns the actual compact serialization format as string object.
-
Constructor Details
-
JWSCompactSerialization
public JWSCompactSerialization(String encodedHeader, String encodedPayload, String encodedSignature) Creates an instance of aJWSCompactSerializationrecord class.- Parameters:
encodedHeader- the value for theencodedHeaderrecord componentencodedPayload- the value for theencodedPayloadrecord componentencodedSignature- the value for theencodedSignaturerecord component
-
-
Method Details
-
of
Factory method which expects an actual compact serialization format.- Parameters:
compactSerialization- an actual compact serialization format.- Returns:
- a JWSCompactSerialization instance.
-
joseHeader
public jakarta.json.JsonObject joseHeader()Decodes the BASE64 URL encoded JOSE header and constructs an appropriateJsonObject.- Returns:
- the JOSE header as
JsonObject.
-
payload
public jakarta.json.JsonObject payload()Decodes the BASE64 URL encoded payload and constructs an appropriateJsonObject.- Returns:
- the parsed
JsonObject
-
strJoseHeader
Returns the decoded (protected) JOSE header.- Returns:
- the decoded JOSE header
-
strPayload
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
encodedHeader
Returns the value of theencodedHeaderrecord component.- Returns:
- the value of the
encodedHeaderrecord component
-
encodedPayload
Returns the value of theencodedPayloadrecord component.- Returns:
- the value of the
encodedPayloadrecord component
-
encodedSignature
Returns the value of theencodedSignaturerecord component.- Returns:
- the value of the
encodedSignaturerecord component
-