Class PayloadSerializer

  • All Implemented Interfaces:
    com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitable, com.fasterxml.jackson.databind.jsonschema.SchemaAware, java.io.Serializable

    public class PayloadSerializer
    extends ClaimsSerializer<PayloadClaimsHolder>
    Jackson serializer implementation for converting into JWT Payload parts.

    This class is thread-safe.

    See Also:
    JWTCreator, Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonSerializer

        com.fasterxml.jackson.databind.JsonSerializer.None
    • Field Summary

      • Fields inherited from class com.fasterxml.jackson.databind.ser.std.StdSerializer

        _handledType
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void writeClaim​(java.util.Map.Entry<java.lang.String,​java.lang.Object> entry, com.fasterxml.jackson.core.JsonGenerator gen)
      Writes the given entry to the JSON representation.
      • Methods inherited from class com.fasterxml.jackson.databind.ser.std.StdSerializer

        _neitherNull, _nonEmpty, acceptJsonFormatVisitor, createSchemaNode, createSchemaNode, findAnnotatedContentSerializer, findContextualConvertingSerializer, findConvertingContentSerializer, findFormatFeature, findFormatOverrides, findIncludeOverrides, findPropertyFilter, getSchema, getSchema, handledType, isDefaultSerializer, visitArrayFormat, visitArrayFormat, visitFloatFormat, visitIntFormat, visitIntFormat, visitStringFormat, visitStringFormat, wrapAndThrow, wrapAndThrow
      • Methods inherited from class com.fasterxml.jackson.databind.JsonSerializer

        getDelegatee, isEmpty, isEmpty, isUnwrappingSerializer, properties, replaceDelegatee, serializeWithType, unwrappingSerializer, usesObjectId, withFilterId, withIgnoredProperties
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PayloadSerializer

        public PayloadSerializer()
    • Method Detail

      • writeClaim

        protected void writeClaim​(java.util.Map.Entry<java.lang.String,​java.lang.Object> entry,
                                  com.fasterxml.jackson.core.JsonGenerator gen)
                           throws java.io.IOException
        Description copied from class: ClaimsSerializer
        Writes the given entry to the JSON representation. Custom claim serialization handling can override this method to provide use-case specific serialization. Implementors who override this method must write the field name and the field value.
        Overrides:
        writeClaim in class ClaimsSerializer<PayloadClaimsHolder>
        Parameters:
        entry - The entry that corresponds to the JSON field to write
        gen - The JsonGenerator to use
        Throws:
        java.io.IOException - if there is either an underlying I/O problem or encoding issue at format layer