Class Header

java.lang.Object
io.fusionauth.jwt.domain.Header

public class Header extends Object
JSON Object Signing and Encryption (JOSE) Header
Author:
Daniel DeGroff
  • Field Details

  • Constructor Details

    • Header

      public Header()
    • Header

      public Header(Algorithm algorithm)
  • Method Details

    • anyGetter

      public Map<String,Object> anyGetter()
      Special getter used to flatten additional header properties into top level values. Necessary to correctly serialize this object.
      Returns:
      a map of properties to be serialized as if they were actual properties of this class.
    • getString

      public String getString(String name)
      Parameters:
      name - the name of the key
      Returns:
      the string value of the object found by the requested key.
    • get

      public Object get(String name)
      Parameters:
      name - the name of the key
      Returns:
      the string value of the object found by the requested key.
    • set

      public Header set(String name, Object value)
      Add a property to the JWT header.
      Parameters:
      name - The name of the header property.
      value - The value of the header property.
      Returns:
      this.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object