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

public static final class JwtBearerGrant.Builder

  1. Object
  2. JwtBearerGrant.Builder

Methods

public JwtBearerGrant.Builder subject(String subject)sub: whom the token acts for.
public JwtBearerGrant.Builder audience(String audience)aud: the token endpoint unless set.
public JwtBearerGrant.Builder scopes(String... scopes)
public JwtBearerGrant.Builder scopes(Collection<String> scopes)
public JwtBearerGrant.Builder scopesInAssertion(boolean inAssertion)Where the scopes go: a scope form parameter (false, the default, as RFC 7521 section 4.1 and RFC 6749 section 3.3 define it) or a scope claim in the assertion (true, as Google expects; the Google builder sets it).
public JwtBearerGrant.Builder assertionLifetimeSeconds(long seconds)
public JwtBearerGrant.Builder transport(TokenEndpoint.Transport transport)
public JwtBearerGrant.Builder clock(Clock clock)
public JwtBearerGrant build()

Inherited methods

Method details

subject

public JwtBearerGrant.Builder subject(String subject)
sub: whom the token acts for. The issuer itself unless set; for a Google Workspace domain-wide delegation, the user being impersonated.

audience

public JwtBearerGrant.Builder audience(String audience)
aud: the token endpoint unless set.

scopes

public JwtBearerGrant.Builder scopes(String... scopes)

scopes

public JwtBearerGrant.Builder scopes(Collection<String> scopes)

scopesInAssertion

public JwtBearerGrant.Builder scopesInAssertion(boolean inAssertion)
Where the scopes go: a scope form parameter (false, the default, as RFC 7521 section 4.1 and RFC 6749 section 3.3 define it) or a scope claim in the assertion (true, as Google expects; the Google builder sets it).

assertionLifetimeSeconds

public JwtBearerGrant.Builder assertionLifetimeSeconds(long seconds)

transport

public JwtBearerGrant.Builder transport(TokenEndpoint.Transport transport)

clock

public JwtBearerGrant.Builder clock(Clock clock)

build

public JwtBearerGrant build()