Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed up azure service token provider #7527

Merged
merged 1 commit into from
Sep 12, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,9 @@ private List<NonInteractiveAzureServiceTokenProviderBase> GetTokenProviders()
return authResult.AccessToken;
}

public async Task<string> GetAccessTokenAsync(string resource, string tenantId)
public Task<string> GetAccessTokenAsync(string resource, string tenantId)
{
return await GetAccessTokenAsync(resource, tenantId, default(CancellationToken)).ConfigureAwait(false);
return GetAccessTokenAsync(resource, tenantId, default(CancellationToken));
}

/// <summary>
Expand All @@ -267,7 +267,7 @@ public async Task<string> GetAccessTokenAsync(string resource, string tenantId)
/// <returns>Access token</returns>
/// <exception cref="ArgumentNullException">Thrown if resource is null or empty.</exception>
/// <exception cref="AzureServiceTokenProviderException">Thrown if access token cannot be acquired.</exception>
public async Task<AppAuthenticationResult> GetAuthenticationResultAsync(string resource, string tenantId = default(string),
public Task<AppAuthenticationResult> GetAuthenticationResultAsync(string resource, string tenantId = default(string),
CancellationToken cancellationToken = default(CancellationToken))
{
if (string.IsNullOrWhiteSpace(resource))
Expand All @@ -277,12 +277,12 @@ public async Task<string> GetAccessTokenAsync(string resource, string tenantId)

string authority = string.IsNullOrEmpty(tenantId) ? string.Empty : $"{_azureAdInstance}{tenantId}";

return await GetAuthResultAsyncImpl(resource, authority, cancellationToken).ConfigureAwait(false);
return GetAuthResultAsyncImpl(resource, authority, cancellationToken);
}

public async Task<AppAuthenticationResult> GetAuthenticationResultAsync(string resource, string tenantId)
public Task<AppAuthenticationResult> GetAuthenticationResultAsync(string resource, string tenantId)
{
return await GetAuthenticationResultAsync(resource, tenantId, default(CancellationToken)).ConfigureAwait(false);
return GetAuthenticationResultAsync(resource, tenantId, default(CancellationToken));
}
}
}