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

public interface TokenProvider

Known subtypesFirebaseAuthTokenProvider

Supplies the Firebase ID token that authenticates Firestore requests.

FirebaseAuthTokenProvider adapts FirebaseAuth. A custom implementation can obtain tokens any other way.

Methods

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

Method details

getIdToken

public abstract String getIdToken()

Returns

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

refreshIdToken

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

Returns

a resource that completes with the new token