From 8d9e7658d7b1842411258f58f8894fc84f0de167 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=B6=E5=BB=BA=E6=AC=A3?= <1059017311@qq.com> Date: Tue, 28 Oct 2025 08:39:41 +0800 Subject: [PATCH] =?UTF-8?q?upd:=E6=8A=8AOAuthClientId=E5=92=8Csecret?= =?UTF-8?q?=E7=9A=84=E8=8E=B7=E5=8F=96=E7=A7=BB=E5=8A=A8=E5=88=B0=E4=BA=86?= =?UTF-8?q?=E5=BE=AA=E7=8E=AF=E7=9A=84=E5=A4=96=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Extensions/YarpSwaggerUIBuilderExtensions.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gateways/KonSoft.InternalGateway/Extensions/YarpSwaggerUIBuilderExtensions.cs b/gateways/KonSoft.InternalGateway/Extensions/YarpSwaggerUIBuilderExtensions.cs index b5bb755..12248f0 100644 --- a/gateways/KonSoft.InternalGateway/Extensions/YarpSwaggerUIBuilderExtensions.cs +++ b/gateways/KonSoft.InternalGateway/Extensions/YarpSwaggerUIBuilderExtensions.cs @@ -27,6 +27,8 @@ namespace KonSoft.InternalGateway.Extensions .ToList(); var gatewayUrl = configuration["GatewayUrl"]; + options.OAuthClientId(configuration["AuthServer:SwaggerClientId"]); + options.OAuthClientSecret(configuration["AuthServer:SwaggerClientSecret"]); foreach (var clusterGroup in groupedClusters) { var routeConfig = yarpConfig.Routes.FirstOrDefault(q => @@ -39,8 +41,6 @@ namespace KonSoft.InternalGateway.Extensions // options.SwaggerEndpoint($"{clusterGroup.Value.Address}/swagger/v1/swagger.json", $"{routeConfig.RouteId} API"); options.SwaggerEndpoint(new Uri(new Uri(!string.IsNullOrWhiteSpace(gatewayUrl)? gatewayUrl: clusterGroup.Value.Address), $"{routeConfig.RouteId.Split("-")[0]}/swagger/v1/swagger.json").AbsoluteUri, $"{routeConfig.RouteId} API"); - options.OAuthClientId(configuration["AuthServer:SwaggerClientId"]); - options.OAuthClientSecret(configuration["AuthServer:SwaggerClientSecret"]); } });