コード例 #1
0
 /// <summary>
 /// Renew the OAuth tokens required to access the cloud based API (Synchronous)
 /// </summary>
 /// <param name="oauthTokens">The tokens that are required to access the user's company files</param>
 /// <param name="cancellationToken"></param>
 /// <returns></returns>
 async public Task<OAuthTokens> RenewTokensAsync(OAuthTokens oauthTokens, CancellationToken cancellationToken)
 {
     var handler = new OAuthRequestHandler(_configuration);
     var request = this.Factory.Create(OAuthRequestHandler.OAuthRequestUri);
     var tokens = await handler.RenewOAuthTokensAsync(request, oauthTokens, cancellationToken);
     return tokens.Item2;
 }