Package org.mortbay.jetty.security

Examples of org.mortbay.jetty.security.SecurityHandler$NotChecked


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

            SecurityHandler sh = new SecurityHandler();
            sh.setUserRealm(new HashUserRealm("MyRealm", getClass().getResource("/TestEndpointProperties/jetty-realm.properties").toURI().toString()));
            sh.setConstraintMappings(new ConstraintMapping[]{cm});

            securedEchoContext = new ContextHandler();
            securedEchoContext.setContextPath("/EchoService");

            HandlerList hc = new HandlerList();
View Full Code Here


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

            SecurityHandler sh = new SecurityHandler();
            sh.setUserRealm( new HashUserRealm( "MyRealm", getBasedir() + "/src/test/resources/realm.properties" ) );
            sh.setConstraintMappings( new ConstraintMapping[] { cm } );

            webapp.addHandler( sh );
        }

        DefaultHandler defaultHandler = new DefaultHandler();
View Full Code Here

    private Server createSecurityServer( String localRepositoryPath )
    {
        Server server = new Server( 0 );

        SecurityHandler sh = createSecurityHandler();

        Context root = new Context( Context.SESSIONS );
        root.setContextPath( "/" );
        root.addHandler( sh );
        root.setResourceBase( localRepositoryPath );
View Full Code Here

            }
        };
        contextHandler.start();
        try
        {
            SecurityHandler securityHandler = webXmlConfiguration.getWebAppContext().getSecurityHandler();

            if ( realm != null )
            {
                securityHandler.setUserRealm(realm);
            }

            root.setSecurityHandler(securityHandler);
        }
        finally
View Full Code Here

        String realm = commandLine.getOptionValue(BASIC_AUTH_REALM);
        String user = commandLine.getOptionValue(CONSOLE_USER);
        String password = commandLine.getOptionValue(CONSOLE_PASSWORD);
        String curatorUser = commandLine.getOptionValue(CURATOR_USER);
        String curatorPassword = commandLine.getOptionValue(CURATOR_PASSWORD);
        SecurityHandler handler = null;
        if ( notNullOrEmpty(realm) && notNullOrEmpty(user) && notNullOrEmpty(password) && notNullOrEmpty(curatorUser) && notNullOrEmpty(curatorPassword) )
        {
            log.warn(Joiner.on(", ").join(BASIC_AUTH_REALM, CONSOLE_USER, CONSOLE_PASSWORD, CURATOR_USER, CURATOR_PASSWORD) + " - have been deprecated. Use TBD instead");
            handler = makeSecurityHandler(realm, user, password, curatorUser, curatorPassword);
        }
View Full Code Here

        ConstraintMapping curatorMapping = new ConstraintMapping();
        curatorMapping.setConstraint(curator);
        curatorMapping.setPathSpec("/exhibitor/v1/cluster/list");

        SecurityHandler handler = new SecurityHandler();
        handler.setUserRealm(userRealm);
        handler.setConstraintMappings(new ConstraintMapping[]{consoleMapping,curatorMapping});
        handler.setAuthenticator(new BasicAuthenticator());

        return handler;
    }
View Full Code Here

TOP

Related Classes of org.mortbay.jetty.security.SecurityHandler$NotChecked

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.