# Constructor

Learn how to initialize an in-memory identity store.

The constructor initializes the store with a client ID and user token.

Both are optional, so it can start empty.

## Signature

The constructor has the following signature:

```php
public function __construct(?Uuid $clientId = null, ?Token $userToken = null)
```

## Example

Here is a basic example of how to seed an in-memory identity store for a test:

```php
<?php
use Croct\Plug\InMemoryIdentityStore;
use Croct\Plug\Uuid;

$storage = new InMemoryIdentityStore(
    clientId: Uuid::parse('f47ac10b-58cc-4372-a567-0e02b2c3d479'),
);
```

## Parameters

The following list describes the supported parameters:

- `clientId`: `Uuid|null` (optional) (default: null) (see [Uuid](/reference/sdk/php/api/storage/uuid))

  The visitor's client ID. The default is `null`, which starts with no client ID.

- `userToken`: `Token|null` (optional) (default: null) (see [Token](/reference/sdk/php/api/authentication/token))

  The visitor's user token. The default is `null`, which starts with no user token.
