Show / Hide Table of Contents

# Interface IAnybillClientAuthModule

Authentication module of the IAnybillClient.

###### Namespace: anybill.POS.Client.Modules

###### Assembly: anybill.POS.Client.Abstractions.dll

##### Syntax

    public interface IAnybillClientAuthModule

### Properties

#### CurrentAuthTokenProvider

Gets or sets the current used IAuthTokenProvider.

##### Declaration

    IAuthTokenProvider CurrentAuthTokenProvider { get; set; }

##### Property Value

Type | Description
--- | ---
IAuthTokenProvider |

### Methods

#### EnsureAsync(Boolean, CancellationToken)

Initializes authentication.

##### Declaration

    Task EnsureAsync(bool reAuthenticate, CancellationToken cancellationToken = default(CancellationToken))

##### Parameters

Type | Name | Description
--- | --- | ---
System.Boolean | reAuthenticate | Whether to request a new authentication token.
System.Threading.CancellationToken | cancellationToken | The cancellation token.

##### Returns

Type | Description
--- | ---
System.Threading.Tasks.Task |

##### Remarks

Prepares the IAnybillClient for the first use. Can be used to test authentication if `reAuthenticate` is set to true.

#### EnsureAsync(CancellationToken)

Initializes authentication.

##### Declaration

    Task EnsureAsync(CancellationToken cancellationToken = default(CancellationToken))

##### Parameters

Type | Name | Description
--- | --- | ---
System.Threading.CancellationToken | cancellationToken | The cancellation token.

##### Returns

Type | Description
--- | ---
System.Threading.Tasks.Task |

##### Remarks

Prepares the IAnybillClient for the first use.