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

public final class JwtValidators

  1. Object
  2. JwtValidators

The validators a decoder is usually given.

decoder.setJwtValidator(JwtValidators.createDefaultWithValidators(
        new JwtIssuerValidator(issuer), new JwtAudienceValidator("orders-api")));

Methods

public static OAuth2TokenValidator<Jwt> createDefault()exp and nbf, with a minute’s allowance; see JwtTimestampValidator.
public static OAuth2TokenValidator<Jwt> createDefaultWithIssuer(String issuer)createDefault, and the token’s iss must be issuer.
public static OAuth2TokenValidator<Jwt> createDefaultWithValidators(OAuth2TokenValidator<Jwt>... more)createDefault and these as well.

Inherited methods

Method details

createDefault

public static OAuth2TokenValidator<Jwt> createDefault()
exp and nbf, with a minute’s allowance; see JwtTimestampValidator.

createDefaultWithIssuer

public static OAuth2TokenValidator<Jwt> createDefaultWithIssuer(String issuer)
createDefault, and the token’s iss must be issuer.

createDefaultWithValidators

public static OAuth2TokenValidator<Jwt> createDefaultWithValidators(OAuth2TokenValidator<Jwt>... more)
createDefault and these as well. Giving a JwtTimestampValidator of one’s own replaces the default one.