IsAccessTokenAlive
public BackendReturnObject IsAccessTokenAlive();
Description
Checks whether the user's current AccessToken is valid for BACKND communication.
Example
Synchronous
BackendReturnObject bro = Backend.BMember.IsAccessTokenAlive();
if(bro.IsSuccess())
{
Debug.Log("AccessToken is alive");
}
Asynchronous
Backend.BMember.IsAccessTokenAlive((callback) =>
{
if(callback.IsSuccess())
Debug.Log("AccessToken is alive");
});
SendQueue
SendQueue.Enqueue(Backend.BMember.IsAccessTokenAlive, (callback) =>
{
if(callback.IsSuccess())
Debug.Log("AccessToken is alive");
});
Return cases
Success cases
When AccessToken is valid
statusCode : 204
Error cases
When the user tries token login but there is no local access token in the device
statusCode : 400
errorCode : accessTokenError
When there is an attempt without customLogin
statusCode : 400
errorCode : UndefinedParameterException
When AccessToken is invalid
statusCode : 401
errorCode : BadUnauthorizedException