Backend API. Server-side code: this runs in a Codename One backend, not in the app on the device.
public final class JwtClaimsSet
- Object
- JwtClaimsSet
The claims of a token that is about to be signed.
long now = System.currentTimeMillis() / 1000;
JwtClaimsSet claims = JwtClaimsSet.builder()
.issuer("https://orders.example.com")
.subject(user.getId())
.audience("orders-api")
.issuedAt(now)
.expiresAt(now + 300)
.claim("scope", "orders:read")
.build();
Nested types
class JwtClaimsSet.Builder | Builds a JwtClaimsSet. |
Methods
Inherited methods
Method details
builder
public static JwtClaimsSet.Builder builder()from
public static JwtClaimsSet.Builder from(JwtClaimsSet claims)A builder that starts from these claims.
getClaims
public Map<String, Object> getClaims()getClaim
public Object getClaim(String name)