From 8f027dbc8fc69fc62c9beec64b1ecf3d3cc96f06 Mon Sep 17 00:00:00 2001 From: Daniil Naumov <44437513+Dezzzu@users.noreply.github.com> Date: Mon, 22 Jan 2024 20:53:43 +0400 Subject: [PATCH] Update SwaggerUiConfig.cs --- Swagger.Net/Application/SwaggerUiConfig.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Swagger.Net/Application/SwaggerUiConfig.cs b/Swagger.Net/Application/SwaggerUiConfig.cs index 7b820dd7..64b58369 100644 --- a/Swagger.Net/Application/SwaggerUiConfig.cs +++ b/Swagger.Net/Application/SwaggerUiConfig.cs @@ -44,6 +44,7 @@ public SwaggerUiConfig(IEnumerable discoveryPaths, Func additionalQueryStringParams = null) { _templateParams["%(OAuth2Enabled)"] = "true"; @@ -191,6 +193,7 @@ public void EnableOAuth2Support( _templateParams["%(OAuth2Realm)"] = realm; _templateParams["%(OAuth2AppName)"] = appName; _templateParams["%(OAuth2ScopeSeparator)"] = scopeSeperator; + _templateParams["%(UsePkceWithAuthorizationCodeGrant)"] = usePkce ? "true" : "false"; if (additionalQueryStringParams != null) _templateParams["%(OAuth2AdditionalQueryStringParams)"] = JsonConvert.SerializeObject(additionalQueryStringParams); @@ -233,4 +236,4 @@ public enum DefaultModelRender Model, Example } -} \ No newline at end of file +}