Package org.eclipse.jetty.security.authentication

Examples of org.eclipse.jetty.security.authentication.BasicAuthenticator


    {
        String auth=configuration.getAuthMethod();
        Authenticator authenticator=null;
       
        if (auth==null || Constraint.__BASIC_AUTH.equalsIgnoreCase(auth))
            authenticator=new BasicAuthenticator();
        else if (Constraint.__DIGEST_AUTH.equalsIgnoreCase(auth))
            authenticator=new DigestAuthenticator();
        else if (Constraint.__FORM_AUTH.equalsIgnoreCase(auth))
            authenticator=new FormAuthenticator();
        else if ( Constraint.__SPNEGO_AUTH.equalsIgnoreCase(auth) )
View Full Code Here


        ConstraintMapping cm = new ConstraintMapping();
        cm.setConstraint(constraint);
        cm.setPathSpec("/*");

        ConstraintSecurityHandler csh = new ConstraintSecurityHandler();
        csh.setAuthenticator(new BasicAuthenticator());
        csh.setRealmName(realm);
        csh.addConstraintMapping(cm);
        csh.setLoginService(l);

        return csh;
View Full Code Here

            HashLoginService loginService = new HashLoginService("Fuseki Authentication", serverConfig.authConfigFile) ;
            loginService.setIdentityService(identService) ;

            securityHandler.setLoginService(loginService) ;
            securityHandler.setAuthenticator(new BasicAuthenticator()) ;

            context.setSecurityHandler(securityHandler) ;

            serverLog.debug("Basic Auth Configuration = " + serverConfig.authConfigFile) ;
        }
View Full Code Here

        if (securityHandler == null) {
            HashLoginService l = new HashLoginService();
            l.setName("realm");

            ConstraintSecurityHandler csh = new ConstraintSecurityHandler();
            csh.setAuthenticator(new BasicAuthenticator());
            csh.setRealmName("realm");
            csh.setLoginService(l);

            securityHandler = csh;
        }
View Full Code Here

    ConstraintMapping cm = new ConstraintMapping();
    cm.setConstraint(constraint);
    cm.setPathSpec("/*");

    ConstraintSecurityHandler csh = new ConstraintSecurityHandler();
    csh.setAuthenticator(new BasicAuthenticator());
    csh.addConstraintMapping(cm);
    csh.setLoginService(login);
    csh.setHandler(handler);
    return csh;
  }
View Full Code Here

        ConstraintMapping mapping = new ConstraintMapping();
        mapping.setPathSpec(cometdServletPath + "/*");
        mapping.setConstraint(constraint);

        security.setConstraintMappings(Collections.singletonList(mapping));
        security.setAuthenticator(new BasicAuthenticator());
        security.setLoginService(loginService);

        connector.setPort(port);
        server.start();

View Full Code Here

        ConstraintSecurityHandler securityHandler = new ConstraintSecurityHandler();
        securityHandler.setLoginService(loginService);

        // TODO: support for other auth schemes (digest, etc)
        securityHandler.setAuthenticator(new BasicAuthenticator());
        securityHandler.setConstraintMappings(Arrays.asList(constraintMapping));
        return securityHandler;
    }
View Full Code Here

      mapping.setPathSpec("/*");
      mapping.setConstraint(constraint);

      ConstraintSecurityHandler sh = new ConstraintSecurityHandler();
      sh.addConstraintMapping(mapping);
      sh.setAuthenticator(new BasicAuthenticator());
      sh.setLoginService(loginService);
      sh.setStrict(true);

      // set the handers: the server hands the request to the security handler,
      // which hands the request to the other handlers when authenticated
View Full Code Here

    return contextPath;
  }

  private SecurityHandler buildSecurityHandler() {
    SecurityHandler securityHandler = new CustomSecurityHandler(); // use our custom security handler that always forces authentication
    securityHandler.setAuthenticator(new BasicAuthenticator());
    securityHandler.setLoginService(new CustomLoginService());

    return securityHandler;
  }
View Full Code Here

        ConstraintSecurityHandler securityHandler = new ConstraintSecurityHandler();
        securityHandler.setLoginService(loginService);

        // TODO: support for other auth schemes (digest, etc)
        securityHandler.setAuthenticator(new BasicAuthenticator());
        securityHandler.setConstraintMappings(Arrays.asList(constraintMapping));
        return securityHandler;
    }
View Full Code Here

TOP

Related Classes of org.eclipse.jetty.security.authentication.BasicAuthenticator

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.