Interface IAuthTokenProvider
- Namespace
- anybill.POS.Client.Authentication
- Assembly
- anybill.POS.Client.Abstractions.dll
A provider that returns an auth token.
public interface IAuthTokenProvider
Remarks
This can be a stateful class and should therefore be used with care.
Methods
GetAsync(bool, CancellationToken)
Returns an auth token.
Task<string> GetAsync(bool reAuthenticate, CancellationToken cancellationToken)
Parameters
reAuthenticate
boolWhether to reset the state.
cancellationToken
CancellationTokenThe cancellation token.
Returns
Remarks
Can be used to test authentication. Set reAuthenticate
to reset the state.
Exceptions
- AuthenticationException
If an error occured while authentication.
GetAsync(CancellationToken)
Returns an auth token.
Task<string> GetAsync(CancellationToken cancellationToken)
Parameters
cancellationToken
CancellationTokenThe cancellation token.
Returns
Remarks
Can be used to test authentication.
Exceptions
- AuthenticationException
If an error occured while authentication.