Class JsonWebToken.Header (1.42.2)

public static class JsonWebToken.Header extends GenericJson

Header as specified in JWT Header.

Inheritance

Object > AbstractMap > GenericData > GenericJson > JsonWebToken.Header

Constructors

Header()

public Header()

Methods

clone()

public JsonWebToken.Header clone()

Makes a "deep" clone of the generic data, in which the clone is completely independent of the original.

Returns
TypeDescription
JsonWebToken.Header
Overrides

getContentType()

public final String getContentType()

Returns the content type header parameter used to declare structural information about the JWT or null for none.

Returns
TypeDescription
String

getType()

public final String getType()

Returns the type header parameter used to declare the type of this object or null for none.

Returns
TypeDescription
String

set(String fieldName, Object value)

public JsonWebToken.Header set(String fieldName, Object value)

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 #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.

Parameters
NameDescription
fieldNameString
valueObject
Returns
TypeDescription
JsonWebToken.Header
Overrides

setContentType(String contentType)

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.

Parameter
NameDescription
contentTypeString
Returns
TypeDescription
JsonWebToken.Header

setType(String type)

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.

Parameter
NameDescription
typeString
Returns
TypeDescription
JsonWebToken.Header