Package org.apache.catalina

Examples of org.apache.catalina.Realm.authenticate()


        }
        String username = request.getParameter(Constants.FORM_USERNAME);
        String password = request.getParameter(Constants.FORM_PASSWORD);
        if (log.isDebugEnabled())
            log.debug("Authenticating username '" + username + "'");
        principal = realm.authenticate(username, password);
        if (principal == null) {
            forwardToErrorPage(request, response, config);
            return (false);
        }
View Full Code Here


        }
        String username = request.getParameter(Constants.FORM_USERNAME);
        String password = request.getParameter(Constants.FORM_PASSWORD);
        if (log.isDebugEnabled())
            log.debug("Authenticating username '" + username + "'");
        principal = realm.authenticate(username, password);
        if (principal == null) {
            forwardToErrorPage(request, response, config);
            return (false);
        }
View Full Code Here

        }
        String username = request.getParameter(Constants.FORM_USERNAME);
        String password = request.getParameter(Constants.FORM_PASSWORD);
        if (log.isDebugEnabled())
            log.debug("Authenticating username '" + username + "'");
        principal = realm.authenticate(username, password);
        if (principal == null) {
            forwardToErrorPage(request, response, config);
            return (false);
        }
View Full Code Here

        Realm realm = context.getRealm();
        String username = hreq.getParameter(Constants.FORM_USERNAME);
        String password = hreq.getParameter(Constants.FORM_PASSWORD);
        if (debug >= 1)
            log("Authenticating username '" + username + "'");
        principal = realm.authenticate(username, password);
        if (principal == null) {
            if (debug >= 1)
                log("Redirect to error page '" + errorURI + "'");
            hres.sendRedirect(hres.encodeRedirectURL(errorURI));
            return (false);
View Full Code Here

        final Realm realm = findRealm(realmName);
        if (realm == null) {
            throw new LoginException("No Tomcat realm available");
        }

        final Principal principal = realm.authenticate(username, password);
        if (principal == null) {
            throw new CredentialNotFoundException(username);
        }

        final Subject subject = createSubject(realm, principal);
View Full Code Here

            Principal webPrincipal = null;
            if (Globals.IS_SECURITY_ENABLED) {
                webPrincipal = AccessController.doPrivileged(new PrivilegedAction<Principal>() {
                    @Override
                    public Principal run() {
                        return realm.authenticate(username, password);
                    }
                });
            } else {
                webPrincipal = realm.authenticate(username, password);
            }
View Full Code Here

                    public Principal run() {
                        return realm.authenticate(username, password);
                    }
                });
            } else {
                webPrincipal = realm.authenticate(username, password);
            }
            if (webPrincipal == null) {
                throw new ServletException(
                        "Failed login while attempting to authenticate " +
                        "user: " + username);
View Full Code Here

            Principal webPrincipal = null;
            if (Globals.IS_SECURITY_ENABLED) {
                webPrincipal = AccessController.doPrivileged(new PrivilegedAction<Principal>() {
                    @Override
                    public Principal run() {
                        return realm.authenticate(username, password);
                    }
                });
            } else {
                webPrincipal = realm.authenticate(username, password);
            }
View Full Code Here

                    public Principal run() {
                        return realm.authenticate(username, password);
                    }
                });
            } else {
                webPrincipal = realm.authenticate(username, password);
            }
            if (webPrincipal == null) {
                throw new ServletException(
                        "Failed login while attempting to authenticate " +
                        "user: " + username);
View Full Code Here

        String pwd = hreq.getParameter(Constants.FORM_PASSWORD);
        char[] password = ((pwd != null)? pwd.toCharArray() : null);

        if (log.isLoggable(Level.FINE))
            log.log(Level.FINE, "Authenticating username '" + username + "'");
        principal = realm.authenticate(username, password);
        if (principal == null) {

            //START Apache bug 36136: Refactor the login and error page forward
            /*
            RequestDispatcher disp =
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.