Currently, we serialize the header claims using Jackson's default writeString. This causes date-time based claims to be serialized as milliseconds since the epoch, instead of the required seconds since the epoch.
This PR refactors much of the logic of the PayloadSerializer out to a new class ClaimsSerializer, which allows a subclass to override how the claim is written (needed to handle the aud claim serialization for the payload).
Changes
Currently, we serialize the header claims using Jackson's default
writeString
. This causes date-time based claims to be serialized as milliseconds since the epoch, instead of the required seconds since the epoch.This PR refactors much of the logic of the
PayloadSerializer
out to a new classClaimsSerializer
, which allows a subclass to override how the claim is written (needed to handle theaud
claim serialization for the payload).