Package org.eclipse.jetty.server

Examples of org.eclipse.jetty.server.UserIdentity$UnauthenticatedUserIdentity


                    return Authentication.SEND_FAILURE;

                if (authStatus == AuthStatus.SUCCESS)
                {
                Set<UserIdentity> ids = clientSubject.getPrivateCredentials(UserIdentity.class);
                    UserIdentity userIdentity;
                    if (ids.size() > 0)
                    {
                        userIdentity = ids.iterator().next();
                    } else {
                        userIdentity = _identityService.newUserIdentity(clientSubject, null, null);
View Full Code Here


    Subject subject = new Subject();

    //TODO: hardcoded to jetty - rewrite
    //*******************************************************
    DefaultIdentityService _identityService = new DefaultIdentityService();
    UserIdentity user = _identityService.newUserIdentity(subject, principal, new String[0]);
       
    Authentication cached=new HttpSessionAuthentication(session, user);
        session.setAttribute(HttpSessionAuthentication.__J_AUTHENTICATED, cached);
    //*******************************************************
     
 
View Full Code Here

      Subject subject = new Subject();
     
      //TODO: hardcoded to jetty - rewrite
      //*******************************************************
      DefaultIdentityService _identityService = new DefaultIdentityService();
      UserIdentity user = _identityService.newUserIdentity(subject, principal, new String[0]);
           
      Authentication cached=new HttpSessionAuthentication(session, user);
            session.setAttribute(HttpSessionAuthentication.__J_AUTHENTICATED, cached);
      //*******************************************************
           
View Full Code Here

    Subject subject = new Subject();

    //TODO: hardcoded to jetty - rewrite
    //*******************************************************
    DefaultIdentityService _identityService = new DefaultIdentityService();
    UserIdentity user = _identityService.newUserIdentity(subject, principal, new String[0]);
       
    Authentication cached=new HttpSessionAuthentication(session, user);
        session.setAttribute(HttpSessionAuthentication.__J_AUTHENTICATED, cached);
    //*******************************************************
     
 
View Full Code Here

                        if (i>0)
                        {
                            String username = credentials.substring(0,i);
                            String password = credentials.substring(i+1);

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

                int n = checkNonce(digest,(Request)request);

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

                    if (principal == null) principal = cert.getIssuerDN();
                    final String username = principal == null ? "clientcert" : principal.getName();

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

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


    /* ------------------------------------------------------------ */
    public UserIdentity login(String username, Object password, ServletRequest request)
    {
        UserIdentity user = _loginService.login(username,password);
        if (user!=null)
        {
            renewSession((HttpServletRequest)request, (request instanceof Request? ((Request)request).getResponse() : null));
            return user;
        }
View Full Code Here

    /* ------------------------------------------------------------ */
    @Override
    public UserIdentity login(String username, Object password, ServletRequest request)
    {
       
        UserIdentity user = super.login(username,password,request);
        if (user!=null)
        {
            HttpSession session = ((HttpServletRequest)request).getSession(true);
            Authentication cached=new SessionAuthentication(getAuthMethod(),user,password);
            session.setAttribute(SessionAuthentication.__J_AUTHENTICATED, cached);
View Full Code Here

            if (isJSecurityCheck(uri))
            {
                final String username = request.getParameter(__J_USERNAME);
                final String password = request.getParameter(__J_PASSWORD);

                UserIdentity user = login(username, password, request);
                LOG.debug("jsecuritycheck {} {}",username,user);
                session = request.getSession(true);
                if (user!=null)
                {                   
                    // Redirect to original request
View Full Code Here

TOP

Related Classes of org.eclipse.jetty.server.UserIdentity$UnauthenticatedUserIdentity

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.