Class JwsHeader

java.lang.Object
com.codename1.backend.security.oauth2.jwt.JwsHeader

public final class JwsHeader extends Object

The header of a signature that is about to be made: which algorithm, and optionally which key and what type of token.

JwsHeader header = JwsHeader.with(SignatureAlgorithm.ES256).type("at+jwt").build();
  • Method Details

    • with

      public static JwsHeader.Builder with(JwsAlgorithm algorithm)
      A header for a token signed with algorithm.
    • getAlgorithm

      public JwsAlgorithm getAlgorithm()
    • getKeyId

      public String getKeyId()
      kid, or null to sign with the first key that fits.
    • getHeaders

      public Map<String,Object> getHeaders()
      Every header, alg first.