mfa 登录逻辑遗漏
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
dd13eddfe3
commit
e4c3521b04
|
@ -221,9 +221,9 @@ namespace IRaCIS.Api.Controllers
|
||||||
|
|
||||||
if (_verifyConfig.CurrentValue.OpenLoginMFA)
|
if (_verifyConfig.CurrentValue.OpenLoginMFA)
|
||||||
{
|
{
|
||||||
//发版屏蔽
|
|
||||||
|
|
||||||
//returnModel.Data.JWTStr = _tokenService.GetToken(IRaCISClaims.Create(returnModel.Data.BasicInfo));
|
|
||||||
|
|
||||||
|
|
||||||
//MFA 发送邮件
|
//MFA 发送邮件
|
||||||
|
|
||||||
|
@ -235,9 +235,19 @@ namespace IRaCIS.Api.Controllers
|
||||||
|
|
||||||
returnModel.Data.BasicInfo.EMail = hiddenEmail;
|
returnModel.Data.BasicInfo.EMail = hiddenEmail;
|
||||||
|
|
||||||
|
//修改密码
|
||||||
|
if (returnModel.Data.BasicInfo.IsFirstAdd)
|
||||||
|
{
|
||||||
|
returnModel.Data.JWTStr = _tokenService.GetToken(IRaCISClaims.Create(returnModel.Data.BasicInfo));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//正常登录才发送邮件
|
||||||
await _userService.SendMFAEmail(userId);
|
await _userService.SendMFAEmail(userId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
returnModel.Data.JWTStr = _tokenService.GetToken(IRaCISClaims.Create(returnModel.Data.BasicInfo));
|
returnModel.Data.JWTStr = _tokenService.GetToken(IRaCISClaims.Create(returnModel.Data.BasicInfo));
|
||||||
|
|
|
@ -45,6 +45,7 @@ partial class Program
|
||||||
Directory.CreateDirectory(dtoPath);
|
Directory.CreateDirectory(dtoPath);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
using (var context = new YourDbContext())
|
using (var context = new YourDbContext())
|
||||||
{
|
{
|
||||||
var model = context.Model;
|
var model = context.Model;
|
||||||
|
|
Loading…
Reference in New Issue