Package org.mortbay.jetty.security

Examples of org.mortbay.jetty.security.Authenticator.authenticate()


                    && pathInContext.endsWith(FormAuthenticator.__J_SECURITY_CHECK)) {
                /**
                 * This is a post request to __J_SECURITY_CHECK. Stop now after authentication.
                 * Whether or not authentication succeeded, we return.
                 */
                authenticator.authenticate(realm, pathInContext, request, response);
                return false;
            }
            // attempt to access an unprotected resource that is not the
            // j_security_check.
            // if we are logged in, return the logged in principal.
View Full Code Here


            // attempt to access an unprotected resource that is not the
            // j_security_check.
            // if we are logged in, return the logged in principal.
            if (request != null) {
                // null response appears to prevent redirect to login page
                Principal user = authenticator.authenticate(realm, pathInContext,
                        request, null);
                if (user == null || user == SecurityHandler.__NOBODY) {
                    //TODO use run-as as nextCaller if present
                    ContextManager.setCallers(defaultPrincipal.getSubject(), defaultPrincipal.getSubject());
                    request.setUserPrincipal(new NotChecked());
View Full Code Here

                //user is not logged in: if access denied, try to log them in.
                try {
                    acc.checkPermission(webResourcePermission);
                } catch (AccessControlException e) {
                    //not logged in: try to log them in.
                    Principal user = authenticator.authenticate(realm, pathInContext, request, response);
                    if (user == SecurityHandler.__NOBODY) {
                        return true;
                    }
                    if (user == null) {
                        throw e;
View Full Code Here

        boolean unauthenticated = !(checked.implies(resourcePermission) || checked.implies(dataPermission));
        boolean forbidden = excludedPermissions.implies(resourcePermission) || excludedPermissions.implies(dataPermission);

        Authenticator authenticator = getAuthenticator();
        if (!unauthenticated && !forbidden) {
            return authenticator.authenticate(realm, pathInContext, request,
                    response);
        } else if (authenticator instanceof FormAuthenticator
                && pathInContext.endsWith(FormAuthenticator.__J_SECURITY_CHECK)) {
            /**
             * This could be a post request to __J_SECURITY_CHECK.
View Full Code Here

        } else if (authenticator instanceof FormAuthenticator
                && pathInContext.endsWith(FormAuthenticator.__J_SECURITY_CHECK)) {
            /**
             * This could be a post request to __J_SECURITY_CHECK.
             */
            return authenticator.authenticate(realm, pathInContext, request,
                    response);
        }

        // attempt to access an unprotected resource that is not the
        // j_security_check.
View Full Code Here

        // attempt to access an unprotected resource that is not the
        // j_security_check.
        // if we are logged in, return the logged in principal.
        if (request != null) {
            // null response appears to prevent redirect to login page
            Principal user = authenticator.authenticate(realm, pathInContext,
                    request, null);
            if (user != null) {
                return user;
            }
        }
View Full Code Here

           
            if (realm != null && auth != null)
            {
                try
                {
                    auth.authenticate(realm, pathInContext, this, null);
                }
                catch (Exception e)
                {
                    Log.ignore(e);
                }
View Full Code Here

           
            if (realm != null && auth != null)
            {
                try
                {
                    auth.authenticate(realm, pathInContext, this, null);
                }
                catch (Exception e)
                {
                    Log.ignore(e);
                }
View Full Code Here

           
            if (realm != null && auth != null)
            {
                try
                {
                    auth.authenticate(realm, pathInContext, this, null);
                }
                catch (Exception e)
                {
                    Log.ignore(e);
                }
View Full Code Here

           
            if (realm != null && auth != null)
            {
                try
                {
                    auth.authenticate(realm, pathInContext, this, null);
                }
                catch (Exception e)
                {
                    Log.ignore(e);
                }
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.