Package org.apache.wicket.authroles.authentication

Examples of org.apache.wicket.authroles.authentication.AuthenticatedWebSession


        signupLabel.setEscapeModelStrings(false);
        return signupLabel;
    }

    private void authenticateUser() {
        AuthenticatedWebSession session = AuthenticatedWebSession.get();
        if (session.signIn(usernameField.getModelObject(), passwordField.getModelObject())) {
            setDefaultResponsePageIfNecessary();
        } else {
            error(getString("errors.password.mismatch"));
        }
    }
View Full Code Here


        @Override
        public void onSubmit() {
            String userId = Login.this.getUserId();
            String password = Login.this.getPassword();
            AuthenticatedWebSession session = (AuthenticatedSession) getSession();
            if (session.authenticate(userId, password)) {
                AuthenticatedSession session2 = ((AuthenticatedSession) Session.get());
                if (session2.getCheckAdmin()) {
                    setResponsePage(ShowAllBook.class);
                } else {
                    setResponsePage(ShowAllBookReader.class);
View Full Code Here

    private void initContent() {
        @SuppressWarnings("serial")
        Form<UsernamePassword> loginForm = new Form<UsernamePassword>("loginForm") {
            @Override
            protected void onSubmit() {
                AuthenticatedWebSession session = AuthenticatedWebSession.get();
                if (session.signIn(user.getUsername(), user.getPassword())) {
                    setDefaultResponsePageIfNecessary();
                } else {
                    error(new StringResourceModel("error", this, null).getString());
                }
            }
View Full Code Here

TOP

Related Classes of org.apache.wicket.authroles.authentication.AuthenticatedWebSession

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.