Skip to content

Commit 2dc0186

Browse files
toitzisoyuka
andauthored
feat(openapi): HTTP Authentication Support for Swagger UI (#6665)
* feat(openapi): http authentication support add support for http authentication (for example http basic or bearer tokens) Closes: #6664 * add symfony support --------- Co-authored-by: soyuka <[email protected]>
1 parent 2426f05 commit 2dc0186

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

ApiPlatformProvider.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -753,6 +753,7 @@ public function register(): void
753753
contactEmail: $config->get('api-platform.swagger_ui.contact.email', ''),
754754
licenseName: $config->get('api-platform.swagger_ui.license.name', ''),
755755
licenseUrl: $config->get('api-platform.swagger_ui.license.url', ''),
756+
httpAuth: $config->get('api-platform.swagger_ui.http_auth', []),
756757
);
757758
});
758759

config/api-platform.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,12 @@
9898
// 'url' => 'https://www.example.com/support',
9999
// 'email' => '[email protected]',
100100
//],
101+
//'http_auth' => [
102+
// 'Personal Access Token' => [
103+
// 'scheme' => 'bearer',
104+
// 'bearerFormat' => 'JWT'
105+
// ]
106+
//]
101107
],
102108

103109
'url_generation_strategy' => UrlGeneratorInterface::ABS_PATH,

0 commit comments

Comments
 (0)