GetTokenResult

public class GetTokenResult extends Object

Result object that contains a Firebase Auth ID Token.

Public Method Summary

long
getAuthTimestamp()
Returns the authentication timestamp in milliseconds since epoch.
Map<StringObject>
getClaims()
Returns the entire payload claims of the ID token including the standard reserved claims as well as the custom claims (set by developer via Admin SDK).
long
getExpirationTimestamp()
Returns the time in milliseconds since epoch at which this ID token will expire
long
getIssuedAtTimestamp()
Returns the issued at timestamp in milliseconds since epoch.
String
getSignInProvider()
Returns the sign-in provider through which the ID token was obtained (anonymous, custom, phone, password, etc).
String
getToken()
Firebase Auth ID Token.

Inherited Method Summary

Public Methods

public long getAuthTimestamp ()

Returns the authentication timestamp in milliseconds since epoch. This is the time the user authenticated (signed in) and not the time the token was refreshed.

public Map<StringObject> getClaims ()

Returns the entire payload claims of the ID token including the standard reserved claims as well as the custom claims (set by developer via Admin SDK). Developers should verify the ID token and parse claims from its payload on the backend and never trust this value on the client. Returns an empty map if no claims are present.

public long getExpirationTimestamp ()

Returns the time in milliseconds since epoch at which this ID token will expire

public long getIssuedAtTimestamp ()

Returns the issued at timestamp in milliseconds since epoch. This is the time the ID token was last refreshed and not the authentication timestamp.

public String getSignInProvider ()

Returns the sign-in provider through which the ID token was obtained (anonymous, custom, phone, password, etc). Note, this does not map to provider IDs. For example, anonymous and custom authentications are not considered providers. We chose the name here to map the name used in the ID token.

public String getToken ()

Firebase Auth ID Token. Useful for authenticating calls against your own backend. Verify the integrity and validity of the token in your server either by using our server SDKs or following the documentation.

发送以下问题的反馈:

此网页
需要帮助?请访问我们的支持页面