Class AccessTokenProvider
- Namespace
- Autodesk.Common.HttpClientLibrary
- Assembly
- Autodesk.Common.HttpClientLibrary.dll
public class AccessTokenProvider : IAccessTokenProvider
- Inheritance
-
AccessTokenProvider
- Implements
-
IAccessTokenProvider
- Inherited Members
Constructors
AccessTokenProvider(Func<Task<string>>)
public AccessTokenProvider(Func<Task<string>> getAccessToken)
Parameters
Properties
AllowedHostsValidator
Returns the Microsoft.Kiota.Abstractions.Authentication.IAccessTokenProvider.AllowedHostsValidator for the provider.
public AllowedHostsValidator AllowedHostsValidator { get; }
Property Value
- AllowedHostsValidator
Methods
GetAuthorizationTokenAsync(Uri, Dictionary<string, object>?, CancellationToken)
This method is called by the Microsoft.Kiota.Abstractions.Authentication.BaseBearerTokenAuthenticationProvider class to get the access token.
public Task<string> GetAuthorizationTokenAsync(Uri uri, Dictionary<string, object>? additionalAuthenticationContext = null, CancellationToken cancellationToken = default)
Parameters
uri
UriThe target URI to get an access token for.
additionalAuthenticationContext
Dictionary<string, object>Additional authentication context to pass to the authentication library.
cancellationToken
CancellationTokenThe cancellation token for the task