/** * Call signOut() and remove the logon data from whereever they have been persisted (e.g. * Cookies) * * @see org.apache.wicket.Session#invalidate() */ @Override public void invalidate() { if (isSessionInvalidated() == false) { getApplication().getSecuritySettings().getAuthenticationStrategy().remove(); super.invalidate(); } }
/** * Call signOut() and remove the logon data from whereever they have been persisted (e.g. * Cookies) * * @see org.apache.wicket.Session#invalidate() */ @Override public void invalidate() { if (isSessionInvalidated() == false) { getApplication().getSecuritySettings().getAuthenticationStrategy().remove(); super.invalidate(); } }
/** * Calls when login button was clicked. * @see LoginButtonsPanel#loginConsumer * @param target {@link AjaxRequestTarget} */ protected void onLoginButtonClick(AjaxRequestTarget target) { IAuthenticationStrategy strategy = getApplication().getSecuritySettings() .getAuthenticationStrategy(); String username = name.getObject(); String password = passwordModel.getObject(); if (OrienteerWebSession.get().signIn(username, password)) { if (rememberMeModel.getObject()) { strategy.save(username, password); } else { strategy.remove(); } onSuccessLogin(); } else { onFailedLogin(target); strategy.remove(); } }
/** * @see org.apache.wicket.markup.html.form.Form#onSubmit() */ @Override public final void onSubmit() { IAuthenticationStrategy strategy = getApplication().getSecuritySettings() .getAuthenticationStrategy(); if (signIn(getUsername(), getPassword())) { if (rememberMe == true) { strategy.save(username, password); } else { strategy.remove(); } onSignInSucceeded(); } else { onSignInFailed(); strategy.remove(); } } }
/** * @see org.apache.wicket.markup.html.form.Form#onSubmit() */ @Override public final void onSubmit() { IAuthenticationStrategy strategy = getApplication().getSecuritySettings() .getAuthenticationStrategy(); if (signIn(getUsername(), getPassword())) { if (rememberMe == true) { strategy.save(username, password); } else { strategy.remove(); } onSignInSucceeded(); } else { onSignInFailed(); strategy.remove(); } } }
@Override protected void onConfigure() { if (!AuthenticatedWebSession.get().isSignedIn()) { IAuthenticationStrategy authenticationStrategy = getApplication().getSecuritySettings() .getAuthenticationStrategy(); String[] data = authenticationStrategy.load(); if ((data != null) && (data.length > 1)) { if (OrienteerWebSession.get().signIn(data[0], data[1])) { name.setObject(data[0]); passwordModel.setObject(data[1]); onSuccessLogin(); } else authenticationStrategy.remove(); } } super.onConfigure(); }
@Override protected void onSubmit(final AjaxRequestTarget target) { if (SyncopeWebApplication.get().getAnonymousUser().equals(usernameField.getRawInput())) { throw new AccessControlException("Illegal username"); } IAuthenticationStrategy strategy = getApplication().getSecuritySettings().getAuthenticationStrategy(); if (AuthenticatedWebSession.get().signIn(usernameField.getRawInput(), passwordField.getRawInput())) { // If login has been called because the user was not yet logged in, than continue to the // original destination, otherwise to the Home page continueToOriginalDestination(); setResponsePage(getApplication().getHomePage()); } else { SyncopeConsoleSession.get().error(getString("login-error")); notificationPanel.refresh(target); } strategy.remove(); } };