Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.

public class FirebaseAuthTokenProvider

  1. Object
  2. FirebaseAuthTokenProvider

ImplementsTokenProvider

A TokenProvider backed by the FirebaseAuth singleton. Sign in with FirebaseAuth first. Requests then carry its ID token and refresh it when the server answers 401.

Constructors

public FirebaseAuthTokenProvider()

Methods

public String getIdToken()
public AsyncResource<String> refreshIdToken()Obtains a fresh token after the server rejected the current one.

Inherited methods

Constructor details

FirebaseAuthTokenProvider

public FirebaseAuthTokenProvider()

Method details

getIdToken

public String getIdToken()

Returns

the current ID token, or null to send the request without one

refreshIdToken

public AsyncResource<String> refreshIdToken()
Obtains a fresh token after the server rejected the current one.

Returns

a resource that completes with the new token