修改登录mfa
continuous-integration/drone/push Build is passing Details

Uat_IRC_Net8
hang 2025-01-03 09:50:18 +08:00
parent 6713a9c8e2
commit a0b18bbf72
3 changed files with 6 additions and 7 deletions

View File

@ -2277,11 +2277,10 @@
<param name="mfaType"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.UserService.VerifyMFACodeAsync(System.Guid,System.String)">
<member name="M:IRaCIS.Core.Application.Service.UserService.VerifyMFACodeAsync(System.String)">
<summary>
验证MFA 邮件
</summary>
<param name="identityUserId"></param>
<param name="Code"></param>
<returns></returns>
<exception cref="T:IRaCIS.Core.Infrastructure.BusinessValidationFailedException"></exception>

View File

@ -10,9 +10,9 @@ namespace IRaCIS.Core.Application.Service
//Task<UserDetailDTO> GetUser(Guid id);
Task<PageOutput<UserListDTO>> GetUserList(UserListQueryDTO param);
Task<IResponseOutput<LoginReturnDTO>> Login(string userName, string password);
Task<IResponseOutput> VerifyMFACodeAsync(Guid userId, string Code);
Task<IResponseOutput> VerifyMFACodeAsync(string Code);
Task<IResponseOutput> SendMFAEmail(Guid userId, UserMFAType mfaType = 0);
Task<IResponseOutput> SendMFAEmail(Guid identityUserId, UserMFAType mfaType = 0);
Task<UserBasicInfo> GetUserBasicInfo(Guid userId, string pwd);
Task<IResponseOutput> ModifyPassword(EditPasswordCommand editPwModel);
Task<IResponseOutput> ResetPassword(Guid userId);

View File

@ -735,12 +735,12 @@ namespace IRaCIS.Core.Application.Service
/// <summary>
/// 发送MFA 验证邮件
/// </summary>
/// <param name="identityUserId"></param>
/// <param name="mfaType"></param>
/// <returns></returns>
public async Task<IResponseOutput> SendMFAEmail(UserMFAType mfaType)
public async Task<IResponseOutput> SendMFAEmail(Guid identityUserId, UserMFAType mfaType)
{
var identityUserId = _userInfo.IdentityUserId;
identityUserId = identityUserId == Guid.Empty ? _userInfo.IdentityUserId : identityUserId;
var userInfo = await _identityUserRepository.Where(u => u.Id == identityUserId).Select(t => new { t.FullName, t.EMail }).FirstOrDefaultAsync();
int verificationCode = new Random().Next(100000, 1000000);