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

# JwtBearerAuth

Defined in: [client/auth.ts:791](https://github.com/PrefectHQ/fastmcp-ts/blob/e4b6038f642b529f601463a576229747afebe9a4/src/client/auth.ts#L791)

An auth provider that acquires a token asynchronously and injects it as a
request header per request. [ClientCredentials](/api/client/classes/ClientCredentials), JwtBearerAuth,
and [EnterpriseManagedAuth](/api/client/classes/EnterpriseManagedAuth) all implement it. The transport recognizes
these by their `kind` discriminant and injects `getHeaders()` on every
request via a custom fetch wrapper (unlike static `BearerAuth`, whose header
never changes, or interactive `OAuth`, which the SDK transport drives itself).

## Implements

* [`AsyncHeaderAuth`](/api/client/interfaces/AsyncHeaderAuth)

## Constructors

### Constructor

```ts theme={null}
new JwtBearerAuth(options): JwtBearerAuth;
```

Defined in: [client/auth.ts:802](https://github.com/PrefectHQ/fastmcp-ts/blob/e4b6038f642b529f601463a576229747afebe9a4/src/client/auth.ts#L802)

#### Parameters

##### options

[`JwtBearerOptions`](/api/client/interfaces/JwtBearerOptions)

#### Returns

`JwtBearerAuth`

## Properties

### kind

```ts theme={null}
readonly kind: "jwt_bearer";
```

Defined in: [client/auth.ts:792](https://github.com/PrefectHQ/fastmcp-ts/blob/e4b6038f642b529f601463a576229747afebe9a4/src/client/auth.ts#L792)

#### Implementation of

[`AsyncHeaderAuth`](/api/client/interfaces/AsyncHeaderAuth).[`kind`](/api/client/interfaces/AsyncHeaderAuth#kind)

## Methods

### getHeaders()

```ts theme={null}
getHeaders(): Promise<Record<string, string>>;
```

Defined in: [client/auth.ts:815](https://github.com/PrefectHQ/fastmcp-ts/blob/e4b6038f642b529f601463a576229747afebe9a4/src/client/auth.ts#L815)

#### Returns

`Promise`\<`Record`\<`string`, `string`>>

#### Implementation of

[`AsyncHeaderAuth`](/api/client/interfaces/AsyncHeaderAuth).[`getHeaders`](/api/client/interfaces/AsyncHeaderAuth#getheaders)
