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

public static final class ClientCredentialsGrant.Builder

  1. Object
  2. ClientCredentialsGrant.Builder

Methods

public ClientCredentialsGrant.Builder clientSecret(String secret)Authenticates with a secret in an HTTP Basic header.
public ClientCredentialsGrant.Builder clientSecret(String secret, ClientCredentialsGrant.Authentication how)Authenticates with a secret, in a header or in the form.
public ClientCredentialsGrant.Builder privateKeyJwt(Jwk privateKey)Authenticates with a JWT signed by privateKey (private_key_jwt).
public ClientCredentialsGrant.Builder scopes(String... scopes)
public ClientCredentialsGrant.Builder scopes(Collection<String> scopes)
public ClientCredentialsGrant.Builder audience(String audience)An audience parameter, which Auth0 and Okta use to name the API the token is for.
public ClientCredentialsGrant.Builder resource(String resource)A resource parameter (RFC 8707).
public ClientCredentialsGrant.Builder transport(TokenEndpoint.Transport transport)
public ClientCredentialsGrant.Builder clock(Clock clock)
public ClientCredentialsGrant build()

Inherited methods

Method details

clientSecret

public ClientCredentialsGrant.Builder clientSecret(String secret)
Authenticates with a secret in an HTTP Basic header.

clientSecret

public ClientCredentialsGrant.Builder clientSecret(String secret, ClientCredentialsGrant.Authentication how)
Authenticates with a secret, in a header or in the form.

privateKeyJwt

public ClientCredentialsGrant.Builder privateKeyJwt(Jwk privateKey)
Authenticates with a JWT signed by privateKey (private_key_jwt). Give the key the id the authorization server registered it under with Jwk.withKeyId(String).

scopes

public ClientCredentialsGrant.Builder scopes(String... scopes)

scopes

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

audience

public ClientCredentialsGrant.Builder audience(String audience)
An audience parameter, which Auth0 and Okta use to name the API the token is for. Not part of RFC 6749; omitted unless set.

resource

public ClientCredentialsGrant.Builder resource(String resource)
A resource parameter (RFC 8707). Omitted unless set.

transport

public ClientCredentialsGrant.Builder transport(TokenEndpoint.Transport transport)

clock

public ClientCredentialsGrant.Builder clock(Clock clock)

build

public ClientCredentialsGrant build()