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

# Class: WorkspaceIdentityClient

> Exchanges the host's sign-in evidence for a short-lived Bijection identity.

[browser](/api/modules/browser).WorkspaceIdentityClient

Exchanges the host's sign-in evidence for a short-lived Bijection identity.
Tokens stay in memory. The backend remains the authority for verifying
tokens and deciding current access; this client checks response routing.
Create one per signed-in session and call `clear` before ending that session.

## Constructors

### constructor

• **new WorkspaceIdentityClient**(`deployment`, `getSignInToken`, `options?`)

#### Parameters

| Name | Type |
| :- | :- |
| `deployment` | `string` |
| `getSignInToken` | (`options`: \{ `forceRefresh`: `boolean`  }) => `Promise`\<`null` \| `string`> |
| `options` | `Object` |
| `options.fetch?` | (`input`: `URL` \| `RequestInfo`, `init?`: `RequestInit`) => `Promise`\<`Response`>(`input`: `string` \| `URL` \| `Request`, `init?`: `RequestInit`) => `Promise`\<`Response`> |

## Methods

### clear

▸ **clear**(): `void`

Discard cached identity and invalidate every outstanding exchange.

#### Returns

`void`

***

### getIdentity

▸ **getIdentity**(`options?`): `Promise`\<`null` | `Token`>

Return an identity for this deployment, or null if the session ended.
A forced refresh supersedes an older exchange as well as the token cache.

#### Parameters

| Name | Type |
| :- | :- |
| `options` | `Object` |
| `options.forceRefreshToken?` | `boolean` |

#### Returns

`Promise`\<`null` | `Token`>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.