Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,35 @@ protected $middlewareGroups = [
],
```

On Laravel 11, the Kernel.php file is removed.
Now, you can add the middleware on `config/app.php` like the example below:

```php
->withMiddleware(function (Middleware $middleware) {
$middleware->group('saml', [
\Illuminate\Cookie\Middleware\EncryptCookies::class,
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
\Illuminate\Session\Middleware\StartSession::class,
]);
})
```

if you are using Laravel 11 behind a proxy, you may need to append trustProxies on last example `config/app.php`:

```php
->withMiddleware(function (Middleware $middleware) {
$middleware->group('saml', [
\Illuminate\Cookie\Middleware\EncryptCookies::class,
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
\Illuminate\Session\Middleware\StartSession::class,
]);

$middleware->trustProxies(at: [
'IP_FROM_YOUR_PROXY',
]);
})
```

### Logging out

There are two ways the user can logout:
Expand Down