/** * Initialize the login form. * * @param comp - The component */ @SuppressWarnings("deprecation") @Override public void doAfterCompose(final Component comp) throws Exception { super.doAfterCompose(comp); savedRequest = (SavedRequest) session.removeAttribute(org.carewebframework.security.spring.Constants.SAVED_REQUEST); final AuthenticationException authError = (AuthenticationException) session .removeAttribute(WebAttributes.AUTHENTICATION_EXCEPTION); CredentialsExpiredException expired = getException(authError, CredentialsExpiredException.class); User user = expired != null && SecurityUtil.getSecurityService().canChangePassword() ? (User) expired .getExtraInformation() : null; String form = user != null ? ChangePasswordController.DIALOG_CHANGE_PASSWORD : LoginPaneController.DIALOG_LOGIN_PANE; Map<Object, Object> args = new HashMap<Object, Object>(); args.put("savedRequest", savedRequest); args.put("authError", authError); args.put("user", user); ZKUtil.loadZulPage(form, loginForm, args, this); getPage().setTitle(user != null ? "Change Password" : "Please Login"); resetTimer(); }
super.doAfterCompose(comp); timer.setDelay(execution.getSession().getMaxInactiveInterval() * 500); savedRequest = (SavedRequest) session.removeAttribute(org.carewebframework.security.spring.Constants.SAVED_REQUEST); AuthenticationException authError = (AuthenticationException) session .removeAttribute(WebAttributes.AUTHENTICATION_EXCEPTION); IUser user = (IUser) session.removeAttribute(org.carewebframework.security.spring.Constants.SAVED_USER); Map<Object, Object> args = new HashMap<Object, Object>(); args.put("savedRequest", savedRequest);
public Object removeAttribute(String name, boolean recurse) { if (recurse && !hasAttribute(name)) { if (_sess != null) { if (_sess.hasAttribute(name, true)) return _sess.removeAttribute(name, true); } else if (_wapp != null) { if (_wapp.hasAttribute(name, true)) return _wapp.removeAttribute(name, true); } return null; } return removeAttribute(name); }
String username = (String) session.removeAttribute(Constants.DEFAULT_USERNAME); username = authError == null ? "" : username; showMessage(authError == null ? null : loginFailureMessage);
String username = (String) session.removeAttribute(Constants.DEFAULT_USERNAME); username = authError == null ? defaultUsername : username; showMessage(authError == null ? null : loginFailureMessage);