Package org.eclipse.jetty.security

Examples of org.eclipse.jetty.security.UserAuthentication


//            final ServletCallbackHandler callbackHandler = new ServletCallbackHandler(loginService);
            final Subject subject = new Subject();
            final AccessControlContext acc = ContextManager.registerSubjectShort(subject, null, null);
            securityHandlerFactory = new ServerAuthenticationGBean(new Authenticator() {
                public Authentication validateRequest(ServletRequest request, ServletResponse response, boolean mandatory) throws ServerAuthException {
                    return new UserAuthentication(this.getAuthMethod(), new GeronimoUserIdentity(subject, new GeronimoUserPrincipal("foo"), acc));
                }// most likely validatedUser is not needed here.

                public boolean secureResponse(ServletRequest request, ServletResponse response, boolean mandatory, Authentication.User validatedUser) throws ServerAuthException {
                    return true;
                }
View Full Code Here


//            final ServletCallbackHandler callbackHandler = new ServletCallbackHandler(loginService);
            final Subject subject = new Subject();
            final AccessControlContext acc = ContextManager.registerSubjectShort(subject, null, null);
            securityHandlerFactory = new ServerAuthenticationGBean(new Authenticator() {
                public Authentication validateRequest(ServletRequest request, ServletResponse response, boolean mandatory) throws ServerAuthException {
                    return new UserAuthentication("test", new GeronimoUserIdentity(subject, new GeronimoUserPrincipal("foo"), acc));
                }// most likely validatedUser is not needed here.

                public boolean secureResponse(ServletRequest request, ServletResponse response, boolean mandatory, Authentication.User validatedUser) throws ServerAuthException {
                    return true;
                }
View Full Code Here

//            final ServletCallbackHandler callbackHandler = new ServletCallbackHandler(loginService);
            final Subject subject = new Subject();
            final AccessControlContext acc = ContextManager.registerSubjectShort(subject, null);
            securityHandlerFactory = new ServerAuthenticationGBean(new Authenticator() {
                public Authentication validateRequest(ServletRequest request, ServletResponse response, boolean mandatory) throws ServerAuthException {
                    return new UserAuthentication("test", new GeronimoJettyUserIdentity(new JACCUserIdentity(subject, new GeronimoUserPrincipal("foo"), acc)));
                }// most likely validatedUser is not needed here.

                public boolean secureResponse(ServletRequest request, ServletResponse response, boolean mandatory, Authentication.User validatedUser) throws ServerAuthException {
                    return true;
                }
View Full Code Here

                    {
                        userIdentity = ids.iterator().next();
                    } else {
                        userIdentity = _identityService.newUserIdentity(clientSubject, null, null);
                    }
                    return new UserAuthentication(getAuthMethod(), userIdentity);
                }
                if (authStatus == AuthStatus.SEND_SUCCESS)
                {
                    //we are processing a message in a secureResponse dialog.
                    return Authentication.SEND_SUCCESS;
View Full Code Here

//            final ServletCallbackHandler callbackHandler = new ServletCallbackHandler(loginService);
            final Subject subject = new Subject();
            final AccessControlContext acc = ContextManager.registerSubjectShort(subject, null, null);
            securityHandlerFactory = new ServerAuthenticationGBean(new Authenticator() {
                public Authentication validateRequest(ServletRequest request, ServletResponse response, boolean mandatory) throws ServerAuthException {
                    return new UserAuthentication(this, new GeronimoUserIdentity(subject, new GeronimoUserPrincipal("foo"), acc));
                }// most likely validatedUser is not needed here.

                public boolean secureResponse(ServletRequest request, ServletResponse response, boolean mandatory, Authentication.User validatedUser) throws ServerAuthException {
                    return true;
                }
View Full Code Here

                            String password = credentials.substring(i+1);

                            UserIdentity user = login (username, password, request);
                            if (user!=null)
                            {
                                return new UserAuthentication(getAuthMethod(),user);
                            }
                        }
                    }
                }
            }
View Full Code Here

                {
                    //UserIdentity user = _loginService.login(digest.username,digest);
                    UserIdentity user = login(digest.username, digest, req);
                    if (user!=null)
                    {
                        return new UserAuthentication(getAuthMethod(),user);
                    }
                }
                else if (n == 0)
                    stale = true;
View Full Code Here

                    final char[] credential = B64Code.encode(cert.getSignature());

                    UserIdentity user = login(username, credential, req);
                    if (user!=null)
                    {
                        return new UserAuthentication(getAuthMethod(),user);
                    }
                }
            }

            if (!DeferredAuthentication.isDeferred(response))
View Full Code Here

            UserIdentity user = login(null,spnegoToken, request);

            if ( user != null )
            {
                return new UserAuthentication(getAuthMethod(),user);
            }
        }

        return Authentication.UNAUTHENTICATED;
    }
View Full Code Here

       
        UserIdentity identity = _authenticator.login(username, password, request);
        if (identity != null)
        {
            IdentityService identity_service = _authenticator.getLoginService().getIdentityService();
            UserAuthentication authentication = new UserAuthentication("API",identity);
            if (identity_service != null)
                _previousAssociation=identity_service.associate(identity);
            return authentication;
        }
        return null;
View Full Code Here

TOP

Related Classes of org.eclipse.jetty.security.UserAuthentication

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.