Class StaticChannelAccessTokenProvider
- Namespace
- Line.OpenApi.Core.Authentication
- Assembly
- Line.OpenApi.Core.dll
Minimal provider that holds and returns a long-lived channel access token. Runtime issuance/refresh of short-lived tokens (v2.1 / JWT) is implemented by the "refreshing provider" in Line.OpenApi.ChannelAccessToken, so that Core takes no reverse dependency on it (design section 7).
public sealed class StaticChannelAccessTokenProvider : IAccessTokenProvider
- Inheritance
-
StaticChannelAccessTokenProvider
- Implements
-
IAccessTokenProvider
- Inherited Members
Constructors
StaticChannelAccessTokenProvider(string, params string[])
public StaticChannelAccessTokenProvider(string channelAccessToken, params string[] allowedHosts)
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
uriUriThe target URI to get an access token for.
additionalAuthenticationContextDictionary<string, object>Additional authentication context to pass to the authentication library.
cancellationTokenCancellationTokenThe cancellation token for the task