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

# Middleware Reference

> List of available middleware in Unleash Commerce Core

## Core Middleware

All middleware are registered as contracts and can be replaced with custom implementations.

| Middleware                      | Contract                                | Namespace                                              | Purpose                                             |
| ------------------------------- | --------------------------------------- | ------------------------------------------------------ | --------------------------------------------------- |
| AddInertiaAuthProps             | AddInertiaAuthPropsContract             | `Esign\UnleashCommerce\Core\Contracts\Http\Middleware` | Shares authenticated user data with Inertia         |
| AddInertiaGuestProps            | AddInertiaGuestPropsContract            | `Esign\UnleashCommerce\Core\Contracts\Http\Middleware` | Shares guest data with Inertia                      |
| EnsureUserHasCustomerMiddleware | EnsureUserHasCustomerMiddlewareContract | `Esign\UnleashCommerce\Core\Contracts\Http\Middleware` | Ensures authenticated users have an active customer |
| HandleInertiaRequests           | HandleInertiaRequestsContract           | `Esign\UnleashCommerce\Core\Contracts\Http\Middleware` | Core Inertia middleware handler                     |
| ProtectsCustomerInvitations     | ProtectsCustomerInvitationsContract     | `Esign\UnleashCommerce\Core\Contracts\Http\Middleware` | Protects customer invitation routes with signatures |
