Class StaticTokenProvider
Provides a static bearer token.
public class StaticTokenProvider : IGraphQlAuthProvider
- Inheritance
-
objectStaticTokenProvider
- Implements
Constructors
StaticTokenProvider(string)
Initializes a new instance with the specified token.
public StaticTokenProvider(string token)
Parameters
tokenstring
Methods
GetTokenAsync(CancellationToken)
Returns the current bearer token.
public Task<string> GetTokenAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenToken to cancel the operation (e.g. a token-refresh request).