use of password.pwm.http.bean.ChangePasswordBean in project pwm by pwm-project.
the class ChangePasswordServlet method processCheckProgressAction.
@ActionHandler(action = "checkProgress")
ProcessStatus processCheckProgressAction(final PwmRequest pwmRequest) throws ServletException, PwmUnrecoverableException, IOException {
final ChangePasswordBean changePasswordBean = pwmRequest.getPwmApplication().getSessionStateService().getBean(pwmRequest, ChangePasswordBean.class);
final PasswordChangeProgressChecker.ProgressTracker progressTracker = changePasswordBean.getChangeProgressTracker();
final PasswordChangeProgressChecker.PasswordChangeProgress passwordChangeProgress;
if (progressTracker == null) {
passwordChangeProgress = PasswordChangeProgressChecker.PasswordChangeProgress.COMPLETE;
} else {
final PasswordChangeProgressChecker checker = new PasswordChangeProgressChecker(pwmRequest.getPwmApplication(), pwmRequest.getPwmSession().getUserInfo().getUserIdentity(), pwmRequest.getSessionLabel(), pwmRequest.getLocale());
passwordChangeProgress = checker.figureProgress(progressTracker);
}
final RestResultBean restResultBean = RestResultBean.withData(passwordChangeProgress);
LOGGER.trace(pwmRequest, "returning result for restCheckProgress: " + JsonUtil.serialize(restResultBean));
pwmRequest.outputJsonResult(restResultBean);
return ProcessStatus.Halt;
}
Aggregations