From d549995e8c38c48d0ed06823e69b4741379ff7c2 Mon Sep 17 00:00:00 2001 From: anjoy8 <3143422472@qq.com> Date: Sun, 25 Aug 2024 17:03:25 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E6=94=B9=E6=96=87?= =?UTF-8?q?=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Blog.Core.Api/Controllers/LoginController.cs | 4 ++-- Blog.Core.Extensions/Authorizations/Policys/JwtToken.cs | 2 +- .../Authorizations/Policys/PermissionHandler.cs | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Blog.Core.Api/Controllers/LoginController.cs b/Blog.Core.Api/Controllers/LoginController.cs index f3e9accc..5b40773d 100644 --- a/Blog.Core.Api/Controllers/LoginController.cs +++ b/Blog.Core.Api/Controllers/LoginController.cs @@ -65,7 +65,7 @@ public async Task> GetJwtStr(string name, string pass) { string jwtStr = string.Empty; bool suc = false; - //这里就是用户登陆以后,通过数据库去调取数据,分配权限的操作 + //这里就是用户登录以后,通过数据库去调取数据,分配权限的操作 var user = await _sysUserInfoServices.GetUserRoleNameStr(name, MD5Helper.MD5Encrypt32(pass)); if (user != null) @@ -101,7 +101,7 @@ public MessageModel GetJwtStrForNuxt(string name, string pass) { string jwtStr = string.Empty; bool suc = false; - //这里就是用户登陆以后,通过数据库去调取数据,分配权限的操作 + //这里就是用户登录以后,通过数据库去调取数据,分配权限的操作 //这里直接写死了 if (name == "admins" && pass == "admins") { diff --git a/Blog.Core.Extensions/Authorizations/Policys/JwtToken.cs b/Blog.Core.Extensions/Authorizations/Policys/JwtToken.cs index 9b8a7389..2b9435a5 100644 --- a/Blog.Core.Extensions/Authorizations/Policys/JwtToken.cs +++ b/Blog.Core.Extensions/Authorizations/Policys/JwtToken.cs @@ -13,7 +13,7 @@ public class JwtToken /// /// 获取基于JWT的Token /// - /// 需要在登陆的时候配置 + /// 需要在登录的时候配置 /// 在startup中定义的参数 /// public static TokenInfoViewModel BuildJwtToken(Claim[] claims, PermissionRequirement permissionRequirement) diff --git a/Blog.Core.Extensions/Authorizations/Policys/PermissionHandler.cs b/Blog.Core.Extensions/Authorizations/Policys/PermissionHandler.cs index c1cf9069..8d09be4f 100644 --- a/Blog.Core.Extensions/Authorizations/Policys/PermissionHandler.cs +++ b/Blog.Core.Extensions/Authorizations/Policys/PermissionHandler.cs @@ -149,14 +149,14 @@ orderby item.Id if (user.IsDeleted) { - _user.MessageModel = new ApiResponse(StatusCode.CODE401, "用户已被删除,禁止登陆!").MessageModel; + _user.MessageModel = new ApiResponse(StatusCode.CODE401, "用户已被删除,禁止登录!").MessageModel; context.Fail(new AuthorizationFailureReason(this, _user.MessageModel.msg)); return; } if (!user.Enable) { - _user.MessageModel = new ApiResponse(StatusCode.CODE401, "用户已被禁用!禁止登陆!").MessageModel; + _user.MessageModel = new ApiResponse(StatusCode.CODE401, "用户已被禁用!禁止登录!").MessageModel; context.Fail(new AuthorizationFailureReason(this, _user.MessageModel.msg)); return; }