Class JsonWebToken.Header

All Implemented Interfaces:
Cloneable, Map<String,Object>
Direct Known Subclasses:
JsonWebSignature.Header
Enclosing class:
JsonWebToken

public static class JsonWebToken.Header extends GenericJson
Header as specified in JWT Header.
  • Field Details

    • type

      private String type
      Type header parameter used to declare the type of this object or null for none.
    • contentType

      private String contentType
      Content type header parameter used to declare structural information about the JWT or null for none.
  • Constructor Details

    • Header

      public Header()
  • Method Details

    • getType

      public final String getType()
      Returns the type header parameter used to declare the type of this object or null for none.
    • setType

      public JsonWebToken.Header setType(String type)
      Sets the type header parameter used to declare the type of this object or null for none.

      Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.

    • getContentType

      public final String getContentType()
      Returns the content type header parameter used to declare structural information about the JWT or null for none.
    • setContentType

      public JsonWebToken.Header setContentType(String contentType)
      Sets the content type header parameter used to declare structural information about the JWT or null for none.

      Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.

    • set

      public JsonWebToken.Header set(String fieldName, Object value)
      Description copied from class: GenericData
      Sets the given field value (may be null) for the given field name. Any existing value for the field will be overwritten. It may be more slightly more efficient than GenericData.put(String, Object) because it avoids accessing the field's original value.

      Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.

      Overrides:
      set in class GenericJson
    • clone

      public JsonWebToken.Header clone()
      Description copied from class: GenericData
      Makes a "deep" clone of the generic data, in which the clone is completely independent of the original.
      Overrides:
      clone in class GenericJson