Interface IAuthenticationTokenProvider
Interface for a thread safe class representing the current authentication token.
Namespace: Tableau.Migration.Api
Assembly: Tableau.Migration.dll
Syntax
public interface IAuthenticationTokenProvider
Methods
ClearAsync(CancellationToken)
Clears the authentication token.
Declaration
Task ClearAsync(CancellationToken cancel)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancel | The cancellation token to obey. |
Returns
Type | Description |
---|---|
Task | The task to await. |
GetAsync(CancellationToken)
Gets the authentication token.
Declaration
Task<string?> GetAsync(CancellationToken cancel)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancel | The cancellation token to obey. |
Returns
Type | Description |
---|---|
Task<string> | A task to await for the current authentication token. |
RequestRefreshAsync(string?, CancellationToken)
Requests an authentication token refresh.
Declaration
Task RequestRefreshAsync(string? previousToken, CancellationToken cancel)
Parameters
Type | Name | Description |
---|---|---|
string | previousToken | The token that was previously used before the refresh was requested. Used to de-duplicate refresh requests. |
CancellationToken | cancel | The cancellation token to obey. |
Returns
Type | Description |
---|---|
Task | The task to await. |
SetAsync(string, CancellationToken)
Sets the authentication token.
Declaration
Task SetAsync(string token, CancellationToken cancel)
Parameters
Type | Name | Description |
---|---|---|
string | token | The authentication token received from the server. |
CancellationToken | cancel | The cancellation token to obey. |
Returns
Type | Description |
---|---|
Task | The task to await. |
Events
RefreshRequestedAsync
Event that fires when an authentication token refresh is requested.
Declaration
event RefreshAuthenticationTokenDelegate? RefreshRequestedAsync
Event Type
Type | Description |
---|---|
RefreshAuthenticationTokenDelegate |