Beispiel #1
0
 /// <summary>
 /// ChangePassword
 /// </summary>
 /// <param name="ChangePasswordModel"></param>
 public void ChangePassword(ChangePasswordModel changePasswordModel)
 {
     ChangePasswordDC changePasswordRequest = new ChangePasswordDC();
     changePasswordRequest.OldPassword = DataEncryption.Encrypt(changePasswordModel.OldPassword);
     changePasswordRequest.NewPassword = DataEncryption.Encrypt(changePasswordModel.NewPassword);
     changePasswordRequest.UserName = changePasswordModel.UserName;
     ServiceResponse changePasswordResponse = _securityProxy.Execute(opt => opt.ChangePassword(changePasswordRequest));
     if (changePasswordResponse.Status != ResponseStatus.Success)
     {
         HandleError(changePasswordResponse.Status, changePasswordResponse.ResponseMessage);
     }
 }
 public HttpResponseMessage ChangePassword(ChangePasswordModel changePasswordModel)
 {
     if (string.IsNullOrEmpty(changePasswordModel.UserName)) // user is chanming self password else called from manage user
         changePasswordModel.UserName = SecurityClientProcessor.UserContext.UserName;
     SecurityClientProcessor.ChangePassword(changePasswordModel);
     return Request.CreateResponse(HttpStatusCode.OK,CoreMessages.PasswordChanged);
 }