Table of Contents

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 bool

Whether to reset the state.

cancellationToken CancellationToken

The cancellation token.

Returns

Task<string>

An auth token.

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 CancellationToken

The cancellation token.

Returns

Task<string>

An auth token.

Remarks

Can be used to test authentication.

Exceptions

AuthenticationException

If an error occured while authentication.