GooglePlayInstant/Editor/QuickDeploy/AccessTokenGetter.cs
/// <summary>
/// Sends an HTTP request to OAuth2 token uri to get a new access token from the authorization code.
/// Stores the values of the new access token and the refresh token, and invokes the post token action when
/// the tokens have been  successfuly received and stored.
/// </summary>
/// <param name="authCode">Authorization code received from OAuth2 to be used to fetch access token.</param>
/// <param name="postTokenAction">An action to invoke once the token has been received and stored.</param>
Sends an HTTP request to OAuth2 token uri to get a new access token from the authorization code.
Stores the values of the new access token and the refresh token, and invokes the post token action when
the tokens have been  successfuly received and stored.
Sends an HTTP request to OAuth2 token uri to get a new access token from the authorization code . Stores the values of the new access token and the refresh token and invokes the post token action when the tokens have been successfuly received and stored .
private static void RequestFirstAccessToken(AuthorizationCode authCode, Action postTokenAction)
        {
            var grantDictionary = new Dictionary<string, string>
            {
                {"code", authCode.Code},
                {"redirect_uri", authCode.RedirectUri},
                {"grant_type", OAuth2CodeGrantType}
            };
            RequestToken(grantDictionary, postTokenAction);
        }
private static void RequestFirstAccessToken ( AuthorizationCode authCode , Action postTokenAction ) { var grantDictionary = new Dictionary < string , string > { { " " , authCode . Code } , { " " , authCode . RedirectUri } , { " " , OAuth2CodeGrantType } } ; RequestToken ( grantDictionary , postTokenAction ) ; }
Sends an HTTP request to OAuth2 token uri to get a new access token from the authorization code.
Sends an HTTP request to OAuth2 token uri to get a new access token from the authorization code .
authCode
AuthorizationCode
Authorization code received from OAuth2 to be used to fetch access token.
Authorization code received from OAuth2 to be used to fetch access token .
postTokenAction
Action
An action to invoke once the token has been received and stored.
An action to invoke once the token has been received and stored .