From 9cbd1faf93df4636032e5987e337bcf6e2d275f6 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Mon, 4 Nov 2024 18:02:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/MinimalApiService/OAuthService.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/IRaCIS.Core.Application/Service/MinimalApiService/OAuthService.cs b/IRaCIS.Core.Application/Service/MinimalApiService/OAuthService.cs index 64474a760..21700e1d7 100644 --- a/IRaCIS.Core.Application/Service/MinimalApiService/OAuthService.cs +++ b/IRaCIS.Core.Application/Service/MinimalApiService/OAuthService.cs @@ -2,8 +2,10 @@ using IdentityModel; using IdentityModel.Client; using IRaCIS.Core.Application.Service.OAuth; +using MassTransit; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Http; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using NPOI.SS.Formula.Functions; @@ -208,12 +210,16 @@ namespace IRaCIS.Core.Application.Service Console.WriteLine(tokenResponse); //结束回话 + var parameters = new Parameters(); - var endUrl = new RequestUrl(disco.EndSessionEndpoint).CreateEndSessionUrl(tokenResponse.IdToken, "http://localhost:6100/OAuth/TestPCKEOrgin"); + parameters.Add("clientId", "aj34vqrpvz8olsbxwtcog"); + var endUrl = new RequestUrl(disco.EndSessionEndpoint).CreateEndSessionUrl(tokenResponse.IdToken, "http://localhost:6100/OAuth/TestPCKEOrgin", extra: parameters); - var _endHttpClient = new HttpClient(); + + Results.Redirect(endUrl); + //var _endHttpClient = new HttpClient(); - var dd = await _endHttpClient.GetAsync(endUrl); + //var dd = await _endHttpClient.GetAsync(endUrl); } else