> ## Documentation Index
> Fetch the complete documentation index at: https://docs.resq.software/llms.txt
> Use this file to discover all available pages before exploring further.

# ResQ.Clients.InfrastructureApiClient.AuthenticateAsync(string,string,System.Threading.CancellationToken)

### [ResQ.Clients](./ResQ.Clients.md "ResQ.Clients").[InfrastructureApiClient](./ResQ.Clients.InfrastructureApiClient.md "ResQ.Clients.InfrastructureApiClient")

## InfrastructureApiClient.AuthenticateAsync(string, string, CancellationToken) Method

Authenticates with infrastructure-api to get a JWT token.
Sets the Authorization header for subsequent requests.

```csharp theme={null}
public System.Threading.Tasks.Task<bool> AuthenticateAsync(string username, string password, System.Threading.CancellationToken ct=default(System.Threading.CancellationToken));
```

#### Parameters

<a name="ResQ.Clients.InfrastructureApiClient.AuthenticateAsync(string,string,System.Threading.CancellationToken).username" />

`username` [System.String](https://learn.microsoft.com/en-us/dotnet/api/system.string "System.String")

<a name="ResQ.Clients.InfrastructureApiClient.AuthenticateAsync(string,string,System.Threading.CancellationToken).password" />

`password` [System.String](https://learn.microsoft.com/en-us/dotnet/api/system.string "System.String")

<a name="ResQ.Clients.InfrastructureApiClient.AuthenticateAsync(string,string,System.Threading.CancellationToken).ct" />

`ct` [System.Threading.CancellationToken](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken "System.Threading.CancellationToken")

#### Returns

[System.Threading.Tasks.Task\<](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 "System.Threading.Tasks.Task`1")[System.Boolean](https://learn.microsoft.com/en-us/dotnet/api/system.boolean "System.Boolean")[>](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 "System.Threading.Tasks.Task`1")
