From a8e02ab1763fd8e169e7d0795aaa2018ae94b12f Mon Sep 17 00:00:00 2001 From: wanghu Date: Thu, 3 Sep 2026 16:57:56 +0800 Subject: [PATCH] 1 --- src/YhCore.WebApi/Middleware/SsoProtectionMiddleware.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/YhCore.WebApi/Middleware/SsoProtectionMiddleware.cs b/src/YhCore.WebApi/Middleware/SsoProtectionMiddleware.cs index dc4878d..7d8f071 100644 --- a/src/YhCore.WebApi/Middleware/SsoProtectionMiddleware.cs +++ b/src/YhCore.WebApi/Middleware/SsoProtectionMiddleware.cs @@ -96,7 +96,7 @@ namespace YhCore.WebApi.Middleware { context.Response.StatusCode = StatusCodes.Status200OK; context.Response.ContentType = "application/json; charset=utf-8"; - throw new DException("未登录!"); + throw new DException(ErrorCode.Unauthorized); } // 未认证 → Challenge → 302 重定向 CAS 登录页(ticket 校验与回跳由新框架 CasAuthenticationHandler 处理)