> Documentation index: https://www.gooddata.ai/docs/gooddata-ui/llms.txt lists every page of these docs as Markdown.

# TigerTokenAuthProvider

- Package: [@gooddata/sdk-backend-tiger](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-tiger/index.md)
- Kind: class
- Source: https://github.com/gooddata/gooddata-ui-sdk/blob/rel/11.64/libs/sdk-backend-tiger/src/auth.ts

This implementation of authentication provider uses an API Token as bearer of authentication.

**Signature:**

```typescript
export declare class TigerTokenAuthProvider extends TigerAuthProviderBase 
```
**Extends:** [TigerAuthProviderBase](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-tiger/sdk-backend-tiger.tigerauthproviderbase/index.md)

## Remarks

You can provide token at construction time and it will be passed on all calls to Tiger APIs

This is a go-to authentication provider for command-line applications. While nothing stops you from using this provider in UI applications, keep in mind that this is discouraged due to security holes it leads to; having the token hardcoded in a UI application means anyone can find it and use it for themselves.

## Properties

| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [onNotAuthenticated](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-tiger/sdk-backend-tiger.tigertokenauthprovider/index.md#tigertokenauthprovideronnotauthenticated) |  | (context: [IAuthenticationContext](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iauthenticationcontext/index.md), error: [NotAuthenticated](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.notauthenticated/index.md)) =&gt; void |  |
| [updateApiToken](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-tiger/sdk-backend-tiger.tigertokenauthprovider/index.md#tigertokenauthproviderupdateapitoken) |  | (apiToken: string) =&gt; void |  |

## Methods

| Method | Modifiers | Description |
| --- | --- | --- |
| [authenticate(context)](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-tiger/sdk-backend-tiger.tigertokenauthprovider/index.md#tigertokenauthproviderauthenticate) |  |  |
| [initializeClient(client)](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-tiger/sdk-backend-tiger.tigertokenauthprovider/index.md#tigertokenauthproviderinitializeclient) |  |  |

## Property details

### TigerTokenAuthProvider.onNotAuthenticated

**Signature:**

```typescript
onNotAuthenticated: (context: IAuthenticationContext, error: NotAuthenticated) => void;
```

### TigerTokenAuthProvider.updateApiToken

**Signature:**

```typescript
updateApiToken: (apiToken: string) => void;
```

## Method details

### TigerTokenAuthProvider.authenticate()

**Signature:**

```typescript
authenticate(context: IAuthenticationContext): Promise<IAuthenticatedPrincipal>;
```

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| context | [IAuthenticationContext](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iauthenticationcontext/index.md) |  |

**Returns:**

Promise&lt;[IAuthenticatedPrincipal](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iauthenticatedprincipal/index.md)&gt;

### TigerTokenAuthProvider.initializeClient()

**Signature:**

```typescript
initializeClient(client: ITigerClient): void;
```

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| client | ITigerClient |  |

**Returns:**

void
