예제 #1
0
        public static async Task <AppTokenResult> RenewAccessTokenAsync(OAuthTicket ticket, FileDataStore datastore, string userid)
        {
            string         oldRefreshToken = ticket.RefreshToken;
            AppTokenResult appToken        = null;

            if (!string.IsNullOrEmpty(oldRefreshToken))
            {
                appToken = await MicrosoftAccountOAuth.RedeemRefreshTokenAsync(msa_client_id, msa_client_secret, oldRefreshToken);
                await SaveToken(datastore, userid, appToken, CancellationToken.None);
            }
            return(appToken);
        }
예제 #2
0
            public static async Task<AppTokenResult> RenewAccessTokenAsync(OAuthTicket ticket, FileDataStore datastore, string userid)
            {
                string oldRefreshToken = ticket.RefreshToken;
                AppTokenResult appToken = null;

                if (!string.IsNullOrEmpty(oldRefreshToken))
                {
                    appToken = await MicrosoftAccountOAuth.RedeemRefreshTokenAsync(msa_client_id, msa_client_secret, oldRefreshToken);
                    await SaveToken(datastore, userid, appToken, CancellationToken.None);
                }
                return appToken;
            }