/// <summary> /// 修改密码 /// </summary> /// <param name="input"></param> /// <param name="output"></param> /// <param name="errMsg"></param> /// <returns></returns> public bool ChangePassword(ChangePasswordInput input, ref ChangePasswordOutput output, ref string errMsg) { bool doChange = HttpCommonMethod <ChangePasswordInput, ChangePasswordOutput>("/antuser/user.resetPassword.do", GlobalVariable.RequestMethod.POST, input, ref output, ref errMsg); if (doChange && output.result == (int)GlobalVariable.Result.Failure) { errMsg = string.IsNullOrEmpty(output.errorCode) ? "修改密码失败" : resources.GetString("E_" + output.errorCode); return(false); } return(doChange); }
public ChangePasswordOutput ChangePassword(ChangePasswordInput input) { try { RestHTTP http = new RestHTTP(); RestRequest req = new RestRequest("api/accounts/ChangePassword", RestSharp.Method.POST); req.AddHeader("Content-Type", "application/json"); req.AddHeader("Authorization", "Bearer " + input.AccessToken); req.AddJsonBody(input); ChangePasswordOutput response = http.HttpPost <ChangePasswordOutput>(req); return(response); } catch (Exception ex) { WriteLogFile.Append("ConfirmPassword : "); WriteLogFile.Append(ex.Message); WriteLogFile.Append(ex.StackTrace); } return(null); }
public void Standart(ChangePasswordOutput output) => ViewModel = new OkObjectResult(output.Success);
public IHttpActionResult ChangePassword(ChangePasswordInput input) { Init(); ChangePasswordOutput output = _authSvc.ChangePassword(input); return Ok(output); }