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

public final class OAuth2AuthorizationValidator

  1. Object
  2. OAuth2AuthorizationValidator

ImplementsOAuth2TokenValidator<Jwt>

Checks a signed access token against its live authorization grant, including client-credentials grants. Removing the grant makes subsequent checks fail. Install alongside timestamp and audience validators on a JWT decoder that verifies the issuer’s signature. The resource server must share the issuer’s authorization store; signature-only verification cannot observe revocation.

Constructors

public OAuth2AuthorizationValidator(OAuth2AuthorizationService authorizations, String issuer)

Methods

public void setClock(Clock clock)The clock used to check the grant’s expiry.
public OAuth2TokenValidatorResult validate(Jwt jwt)Whether token passes, and why not.

Inherited methods

Constructor details

OAuth2AuthorizationValidator

public OAuth2AuthorizationValidator(OAuth2AuthorizationService authorizations, String issuer)

Method details

setClock

public void setClock(Clock clock)
The clock used to check the grant’s expiry.

validate

public OAuth2TokenValidatorResult validate(Jwt jwt)
Whether token passes, and why not.