Backend API. Server-side code: this runs in a Codename One backend, not in the app on the device.

public final class JwsHeader

  1. Object
  2. JwsHeader

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();

Nested types

class JwsHeader.BuilderBuilds a JwsHeader.

Methods

public static JwsHeader.Builder with(JwsAlgorithm algorithm)A header for a token signed with algorithm.
public JwsAlgorithm getAlgorithm()
public String getKeyId()kid, or null to sign with the first key that fits.
public Map<String, Object> getHeaders()Every header, alg first.

Inherited methods

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.