Package org.eclipse.jetty.security

Examples of org.eclipse.jetty.security.SecurityHandler


     */
    public synchronized void addServant(URL url, JettyHTTPHandler handler) {
       
        checkRegistedContext(url);
       
        SecurityHandler securityHandler = null;
        if (server == null) {
            DefaultHandler defaultHandler = null;
            // create a new jetty server instance if there is no server there           
            server = new Server();
           
View Full Code Here


        _servletContext=context==null?new ContextHandler.NoContext():context;
        _contextHandler=(ServletContextHandler)(context==null?null:context.getContextHandler());

        if (_contextHandler!=null)
        {
            SecurityHandler security_handler = _contextHandler.getChildHandlerByClass(SecurityHandler.class);
            if (security_handler!=null)
                _identityService=security_handler.getIdentityService();
        }

        updateNameMappings();
        updateMappings();       
       
View Full Code Here

        context.addFilter(GzipFilter.class, "/*", null);
        // -- gzip request filter
        context.addFilter(GZipRequestFilter.class, "/*", null);
        // -- security handler
        if (loginService != null) {
            SecurityHandler securityHandler = createSecurityHandler(loginService);
            context.setSecurityHandler(securityHandler);
        }
        // -- user provided filters
        for (Filter filter : filters) {
            context.addFilter(new FilterHolder(filter), "/*", null);
View Full Code Here

    ServletContextHandler context = new ServletContextHandler(ServletContextHandler.NO_SESSIONS);
    context.addServlet(new ServletHolder(new JettyServlet()), contextPath);

    if (configuration.isUseBasicAuth()) {
      SecurityHandler securityHandler = buildSecurityHandler();
      context.setSecurityHandler(securityHandler);
    }

    server.setHandler(context);
  }
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

        // -- gzip response filter
        context.addFilter(GzipFilter.class, "/*", null);
        // -- security handler
        if (loginService != null) {
            SecurityHandler securityHandler = createSecurityHandler(loginService);
            context.setSecurityHandler(securityHandler);
        }
        // -- user provided filters
        for (Filter filter : filters) {
            context.addFilter(new FilterHolder(filter), "/*", null);
View Full Code Here

            PreHandler preHandler = preHandlerFactory.createHandler();
            sessionHandler = handlerFactory.createHandler(preHandler);
        } else {
            sessionHandler = new SessionHandler();
        }
        SecurityHandler securityHandler = null;
//        if (securityRealmName != null) {
//            InternalJAASJettyRealm internalJAASJettyRealm = jettyContainer.addRealm(securityRealmName);
            //wrap jetty realm with something that knows the dumb realmName
//            JAASJettyRealm realm = new JAASJettyRealm(realmName, internalJAASJettyRealm);
        if (securityHandlerFactory != null) {
View Full Code Here

                              ConfigurationFactory configurationFactory,
                              String realmName,
                              String authMethod,
                              Properties properties,
                              ClassLoader classLoader) throws Exception {
        SecurityHandler securityHandler = null;
        if (configurationFactory != null) {
            BuiltInAuthMethod builtInAuthMethod = BuiltInAuthMethod.getValueOf(authMethod);
            JettySecurityHandlerFactory  factory = new JettySecurityHandlerFactory(builtInAuthMethod, null, null, realmName, configurationFactory);
            //TODO use actual default subject here.
            securityHandler = factory.buildSecurityHandler(contextID, null, null, false);
View Full Code Here

     *
     * @param url the URL associated with the servant
     * @param handler notified on incoming HTTP requests
     */
    public synchronized void addServant(URL url, JettyHTTPHandler handler) {
        SecurityHandler securityHandler = null;
        if (server == null) {
            DefaultHandler defaultHandler = null;
            // create a new jetty server instance if there is no server there           
            server = new Server();
           
View Full Code Here

    public synchronized void addServant(URL url, JettyHTTPHandler handler) {
        if (shouldCheckUrl(handler.getBus())) {
            checkRegistedContext(url);
        }
       
        SecurityHandler securityHandler = null;
        if (server == null) {
            DefaultHandler defaultHandler = null;
            // create a new jetty server instance if there is no server there           
            server = new Server();
           
View Full Code Here

TOP

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

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.