GooglePlayInstant/Editor/QuickDeploy/AccessTokenGetter.cs
/// <summary>
/// Retrieves and stores a new access token if the current token is invalid, and executes the post token action
/// when the new valid access token is available.
/// </summary>
/// <param name="postTokenAction">Action to be executed when valid access token is avalable.</param>
Retrieves and stores a new access token if the current token is invalid, and executes the post token action
when the new valid access token is available.
Retrieves and stores a new access token if the current token is invalid and executes the post token action when the new valid access token is available .
public static void ValidateAccessToken(Action postTokenAction)
        {
            if (AccessToken.IsValid())
            {
                postTokenAction();
                return;
            }
            if (string.IsNullOrEmpty(GcpAccessToken.RefreshToken))
            {
                GetAuthCode(code => RequestFirstAccessToken(code, postTokenAction));
                return;
            }
            RefreshAccessToken(GcpAccessToken.RefreshToken, postTokenAction);
        }
public static void ValidateAccessToken ( Action postTokenAction ) { if ( AccessToken . IsValid ( ) ) { postTokenAction ( ) ; return ; } if ( string . IsNullOrEmpty ( GcpAccessToken . RefreshToken ) ) { GetAuthCode ( code => RequestFirstAccessToken ( code , postTokenAction ) ) ; return ; } RefreshAccessToken ( GcpAccessToken . RefreshToken , postTokenAction ) ; }
Retrieves and stores a new access token if the current token is invalid, and executes the post token action
when the new valid access token is available.
Retrieves and stores a new access token if the current token is invalid and executes the post token action when the new valid access token is available .
// Access token is valid. No need to request a new one. // If there is no refresh token, go though authorization process. // If refresh token  is present, request a new access token using the refresh token.
postTokenAction
Action
Action to be executed when valid access token is avalable.
Action to be executed when valid access token is avalable .