|
@@ -262,6 +262,29 @@ public class UserController : BaseController
|
|
|
return Task.FromResult(Convert.ToBoolean(claim.Value));
|
|
|
}
|
|
|
|
|
|
+ /// <summary>
|
|
|
+ /// 修改密码
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="dto"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpPost("change-pwd")]
|
|
|
+ public async Task ChangePassword([FromBody] UserChangePasswordDto dto)
|
|
|
+ {
|
|
|
+ var changepwdRsp = await _identityClient.ChangePasswordAsync(dto, HttpContext.RequestAborted);
|
|
|
+ CheckHttpRequestSuccess(changepwdRsp, "ChangePasswordAsync");
|
|
|
+ }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 重置密码
|
|
|
+ /// </summary>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpPost("initial-pwd/{userId}")]
|
|
|
+ public async Task InitialPassword(string userId)
|
|
|
+ {
|
|
|
+ var initpwdRsp = await _identityClient.InitialPasswordAsync(userId, HttpContext.RequestAborted);
|
|
|
+ CheckHttpRequestSuccess(initpwdRsp, "InitialPasswordAsync");
|
|
|
+ }
|
|
|
+
|
|
|
#region private
|
|
|
|
|
|
private async Task<bool> IsAccountLock(string userId)
|