Beamable SDK
|
This type defines the Client main entry point for the AccessToken feature. More...
Public Member Functions | |
AccessToken (AccessTokenStorage storage, string cid, string pid, string token, string refreshToken, long expiresAt) | |
AccessToken (AccessTokenStorage storage, string cid, string pid, string token, string refreshToken, string expiresAtISO) | |
Promise< Unit > | Save () |
Saving an AccessToken commits the full token structure to PlayerPrefs. Only one token can be saved per player code / cid / pid combo. More... | |
Promise< Unit > | SaveAsCustomerScoped () |
Saving an AccessToken as a customer scoped token will commit the full token structure to PlayerPrefs, but do so without scoping it with the token's AccessToken.Pid. Only one token can be saved per player code / cid combo. More... | |
Promise< Unit > | Delete () |
Deleting an AccessToken will remove the full token structure from PlayerPrefs. More... | |
Promise< Unit > | DeleteAsCustomerScoped () |
Deleting an AccessToken will remove the full token structure from PlayerPrefs. More... | |
void | CorruptAccessToken () |
DANGEROUS This method can be used to simulate what happens if the internal AccessToken.Token is corrupted. You may want to do this during testing to check if the game can recover from a corrupted token. | |
void | ExpireAccessToken () |
DANGEROUS This method can be used to simulate what happens if the internal AccessToken.Token has expired. You may want to do this during testing to check if the game can recover from an expired token. | |
Properties | |
string | Token [get] |
string | RefreshToken [get] |
DateTime | ExpiresAt [getset] |
string | Cid [get] |
string | Pid [get] |
bool | IsExpired [get] |
Check if the Token is expired, or will expire within the play session. | |
Properties inherited from Beamable.Common.Api.IAccessToken | |
string | Token [get] |
The token is a temporary access token that authenticates a player. This string should not be stored on its own, because eventually it will expire and cease to function. When the token expires, a new token will be issued by using the RefreshToken | |
string | RefreshToken [get] |
When the Token expires, the refresh token can be used to issue a new token string by using the Auth.IAuthApi.LoginRefreshToken method | |
DateTime | ExpiresAt [get] |
Indicates when the Token will expire. | |
string | Cid [get] |
The customer organization that this token is valid for. | |
string | Pid [get] |
The realm id that this token is valid for. If this token is a customer scoped token, then the value of the Pid will be null | |
This type defines the Client main entry point for the AccessToken feature.
Deleting an AccessToken will remove the full token structure from PlayerPrefs.
Deleting an AccessToken will remove the full token structure from PlayerPrefs.
Saving an AccessToken commits the full token structure to PlayerPrefs. Only one token can be saved per player code / cid / pid combo.
Saving an AccessToken as a customer scoped token will commit the full token structure to PlayerPrefs, but do so without scoping it with the token's AccessToken.Pid. Only one token can be saved per player code / cid combo.