From f9e09be917a1286262aff31a376aff8d8a0e18ed Mon Sep 17 00:00:00 2001 From: Justin Dearing Date: Sun, 26 Jun 2022 09:31:25 -0400 Subject: [PATCH] Updated the comments around client secret. --- src/Swashbuckle.AspNetCore.SwaggerUI/SwaggerUIOptions.cs | 1 + .../SwaggerUIOptionsExtensions.cs | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Swashbuckle.AspNetCore.SwaggerUI/SwaggerUIOptions.cs b/src/Swashbuckle.AspNetCore.SwaggerUI/SwaggerUIOptions.cs index d0a479e317..0c30cc59d3 100644 --- a/src/Swashbuckle.AspNetCore.SwaggerUI/SwaggerUIOptions.cs +++ b/src/Swashbuckle.AspNetCore.SwaggerUI/SwaggerUIOptions.cs @@ -192,6 +192,7 @@ public class OAuthConfigObject /// /// Default clientSecret /// + /// Setting this exposes the client secrets in inline javascript in the swagger-ui generated html. public string ClientSecret { get; set; } = null; /// diff --git a/src/Swashbuckle.AspNetCore.SwaggerUI/SwaggerUIOptionsExtensions.cs b/src/Swashbuckle.AspNetCore.SwaggerUI/SwaggerUIOptionsExtensions.cs index 7c3cad1a4e..d884b6cde6 100644 --- a/src/Swashbuckle.AspNetCore.SwaggerUI/SwaggerUIOptionsExtensions.cs +++ b/src/Swashbuckle.AspNetCore.SwaggerUI/SwaggerUIOptionsExtensions.cs @@ -236,8 +236,9 @@ public static void OAuthUsername(this SwaggerUIOptions options, string value) /// /// /// + /// Setting this exposes the client secrets in inline javascript in the swagger-ui generated html. public static void OAuthClientSecret(this SwaggerUIOptions options, string value) - { + { options.OAuthConfigObject.ClientSecret = value; }