Skip to content
Merged
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
26 changes: 26 additions & 0 deletions core/openapi.md
Original file line number Diff line number Diff line change
Expand Up @@ -924,6 +924,32 @@ return [
> **must** be set according to the
> [OpenID Connect specification](https://openid.net/specs/openid-connect-core-1_0.html).

## Sending Credentials with Swagger UI Requests

When your API is deployed behind a proxy that uses cookie-based authentication (e.g. Cloudflare
Access), Swagger UI's requests may be rejected because the authentication cookie is not forwarded by
default. Enabling `withCredentials` adds a `requestInterceptor` to SwaggerUIBundle that sets
`credentials: 'include'` on every outgoing request, ensuring cookies are sent alongside token and
CORS requests.

### Sending Credentials with Swagger UI Requests using Symfony

> [!NOTE] This feature is only available with Laravel. You're welcome to contribute the Symfony
> implementation [on GitHub](https://github.com/api-platform/core).

### Sending Credentials with Swagger UI Requests using Laravel

```php
<?php
// config/api-platform.php
return [
// ...
'swagger_ui' => [
'with_credentials' => true,
],
];
```

## Info Object

The [info object](https://swagger.io/specification/#info-object) provides metadata about the API
Expand Down
Loading