Package org.eclipse.jetty.security

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


     *
     * @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) {
       
        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

     *
     * @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

     *
     * @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

        loginService.putUser( Users.JANNE, new Password(Users.JANNE_PASS), new String[] {"Authenticated"} );

        WebAppContext webAppContext = new WebAppContext(path, context);

        // Add a security handler.
        SecurityHandler csh = new ConstraintSecurityHandler();
        csh.setLoginService( loginService );
        webAppContext.setSecurityHandler( csh );

        log.error( "Adding webapp " + context + " for path " + path );
        handlerCollection.addHandler( webAppContext );
View Full Code Here

    private void readObject(ObjectInputStream stream)
        throws IOException, ClassNotFoundException
    {
        stream.defaultReadObject();

        SecurityHandler security=SecurityHandler.getCurrentSecurityHandler();
        if (security==null)
            throw new IllegalStateException("!SecurityHandler");
        LoginService login_service=security.getLoginService();
        if (login_service==null)
            throw new IllegalStateException("!LoginService");

        _userIdentity=login_service.login(_name,_credentials);
        LOG.debug("Deserialized and relogged in {}",this);
View Full Code Here

        doLogout();
    }

    private void doLogout()
    {
        SecurityHandler security=SecurityHandler.getCurrentSecurityHandler();
        if (security!=null)
            security.logout(this);
        if (_session!=null)
            _session.removeAttribute(AbstractSession.SESSION_KNOWN_ONLY_TO_AUTHENTICATED);
    }
View Full Code Here

                out.closeTag();
            }
        }

        // Security elements
        SecurityHandler security =_webApp. getSecurityHandler();

        if (security!=null && (security.getRealmName()!=null || security.getAuthMethod()!=null))
        {
            out.openTag("login-config");
            if (security.getAuthMethod()!=null)
                out.tag("auth-method",origin(md,"auth-method"),security.getAuthMethod());
            if (security.getRealmName()!=null)
                out.tag("realm-name",origin(md,"realm-name"),security.getRealmName());


            if (Constraint.__FORM_AUTH.equalsIgnoreCase(security.getAuthMethod()))
            {
                out.openTag("form-login-config");
                out.tag("form-login-page",origin(md,"form-login-page"),security.getInitParameter(FormAuthenticator.__FORM_LOGIN_PAGE));
                out.tag("form-error-page",origin(md,"form-error-page"),security.getInitParameter(FormAuthenticator.__FORM_ERROR_PAGE));
                out.closeTag();
            }

            out.closeTag();
        }
View Full Code Here

        ServletContextHandler root = new ServletContextHandler(contexts,"/",ServletContextHandler.SESSIONS);

        SessionHandler session = root.getSessionHandler();
        ServletHandler servlet = root.getServletHandler();
        SecurityHandler security = new ConstraintSecurityHandler();
        root.setSecurityHandler(security);

        _server.start();

        assertEquals(root, AbstractHandlerContainer.findContainerOf(_server, ContextHandler.class, session));
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

TOP

Related Classes of org.eclipse.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.