Skip to content

Commit 3671f5b

Browse files
ViPErCZsoyuka
andauthored
feat: swagger ui persist authorization option (#6877)
Co-authored-by: Antoine Bluchet <[email protected]>
1 parent 86adf40 commit 3671f5b

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

ApiPlatformProvider.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -777,6 +777,7 @@ public function register(): void
777777
contactEmail: $config->get('api-platform.swagger_ui.contact.email', ''),
778778
licenseName: $config->get('api-platform.swagger_ui.license.name', ''),
779779
licenseUrl: $config->get('api-platform.swagger_ui.license.url', ''),
780+
persistAuthorization: $config->get('api-platform.swagger_ui.persist_authorization', false),
780781
httpAuth: $config->get('api-platform.swagger_ui.http_auth', []),
781782
);
782783
});

public/init-swagger-ui.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ window.onload = function() {
4545
spec: data.spec,
4646
dom_id: '#swagger-ui',
4747
validatorUrl: null,
48+
persistAuthorization: data.persistAuthorization,
4849
oauth2RedirectUrl: data.oauth.redirectUrl,
4950
presets: [
5051
SwaggerUIBundle.presets.apis,

0 commit comments

Comments
 (0)