Class FirebaseAuthTokenProvider
java.lang.Object
com.codename1.cloud.firebase.FirebaseAuthTokenProvider
- All Implemented Interfaces:
TokenProvider
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.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns
Obtains a fresh token after the server rejected the current one.
-
Constructor Details
-
FirebaseAuthTokenProvider
public FirebaseAuthTokenProvider()
-
-
Method Details
-
getIdToken
Description copied from interface:TokenProviderReturns
the current ID token, or null to send the request without one
- Specified by:
getIdTokenin interfaceTokenProvider
-
refreshIdToken
Description copied from interface:TokenProviderObtains a fresh token after the server rejected the current one.
Returns
a resource that completes with the new token
- Specified by:
refreshIdTokenin interfaceTokenProvider
-