public static async Task<AppTokenResult> RenewAccessTokenAsync(OAuthTicket ticket)
        {
            string oldRefreshToken = ticket.RefreshToken;
            AppTokenResult appToken = null;

            if (!string.IsNullOrEmpty(oldRefreshToken))
            {
                appToken = await MicrosoftAccountOAuth.RedeemRefreshTokenAsync(msa_client_id, msa_client_secret, oldRefreshToken);
                SaveRefreshToken(appToken.RefreshToken);
            }

            return appToken;
        }
Beispiel #2
0
        public static async Task <AppTokenResult> RenewAccessTokenAsync(OAuthTicket ticket)
        {
            string         oldRefreshToken = ticket.RefreshToken;
            AppTokenResult appToken        = null;

            if (!string.IsNullOrEmpty(oldRefreshToken))
            {
                appToken = await MicrosoftAccountOAuth.RedeemRefreshTokenAsync(msa_client_id, msa_client_secret, oldRefreshToken);

                SaveRefreshToken(appToken.RefreshToken);
            }

            return(appToken);
        }