Interface IKeycloakAccessTokenProvider
- Assembly
- Keycloak.AuthServices.Authorization.dll
Provides access tokens for Keycloak authorization server requests.
public interface IKeycloakAccessTokenProvider
Remarks
The default implementation uses IHttpContextAccessor to extract the token from the current HTTP context. For SignalR or other long-lived connection scenarios, implement this interface to provide fresh tokens from an alternative source.
Methods
GetAccessTokenAsync(CancellationToken)
Gets the current access token.
Task<string?> GetAccessTokenAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenThe cancellation token.