Package com.sun.net.httpserver

Examples of com.sun.net.httpserver.Authenticator$Result


    }

    private Result scanResultsByExtension(String ns, String actionName, String pathPrefix,
            String resultCode, ActionContext actionContext) {
        Map<String, ResultTypeConfig> resultsByExtension = conventionsService.getResultTypesByExtension(parentPackage);
        Result result = null;
        for (String ext : resultsByExtension.keySet()) {
            if (LOG.isTraceEnabled()) {
                String fqan = ns + "/" + actionName;
                LOG.trace("Trying to locate the correct result for the FQ action [#0]"
                        + " with an file extension of [#1] in the directory [#2] " + "and a result code of [#3]",
View Full Code Here


        PackageConfig pkg = configuration.getPackageConfig(actionConfig.getPackageName());
        String ns = pkg.getNamespace();
        String pathPrefix = determinePath(actionConfig, ns);

        Result result = scanResultsByExtension(ns, actionName, pathPrefix, resultCode, actionContext);

        if (result == null) {
            // Try /idx/action/index.jsp
            Map<String, ResultTypeConfig> resultsByExtension = conventionsService.getResultTypesByExtension(pkg);
            for (String ext : resultsByExtension.keySet()) {
View Full Code Here

        ObjectFactory workingFactory = configuration.getContainer().getInstance(ObjectFactory.class);
        ConventionUnknownHandler uh = new ConventionUnknownHandler(configuration, workingFactory, context, mockContainer, "struts-default", null, "-");
        ActionContext actionContext = new ActionContext(Collections.EMPTY_MAP);

        Result result = uh.handleUnknownResult(actionContext, "foo", pkgConfig.getActionConfigs().get("foo"), "bar");
        assertNotNull(result);
        assertTrue(result instanceof ActionChainResult);
        ActionChainResult chainResult = (ActionChainResult) result;
        ActionChainResult chainResultToCompare = new ActionChainResult(null, "foo-bar", null);
        assertEquals(chainResultToCompare, chainResult);
View Full Code Here

    /**
     * Iterate over UnknownHandlers and return the result of the first one that can handle it
     */
    public Result handleUnknownResult(ActionContext actionContext, String actionName, ActionConfig actionConfig, String resultCode) {
        for (UnknownHandler unknownHandler : unknownHandlers) {
            Result result = unknownHandler.handleUnknownResult(actionContext, actionName, actionConfig, resultCode);
            if (result != null)
                return result;
        }

        return null;
View Full Code Here

    List<Filter> getSystemFilters () {
        return sfilters;
    }

    public Authenticator setAuthenticator (Authenticator auth) {
        Authenticator old = authenticator;
        authenticator = auth;
        authfilter.setAuthenticator (auth);
        return old;
    }
View Full Code Here

    }

    @Override
    public Authenticator setAuthenticator(Authenticator auth)
    {
      Authenticator previous = _authenticator;
      _authenticator = auth;
        return previous;
    }
View Full Code Here

                       {
        if (!target.startsWith(getContextPath())) return;
        JettyHttpExchange jettyHttpExchange = new JettyHttpExchange(_context, req, resp);
        try
        {
            Authenticator auth = _context.getAuthenticator();

            if (auth != null)
            {
                Authenticator.Result authResult = auth.authenticate(jettyHttpExchange);
                if (authResult instanceof Authenticator.Success)
                {
                    HttpPrincipal p = ((Authenticator.Success)authResult).getPrincipal();
                    jettyHttpExchange.setPrincipal(p);
                    invokeHandler(jettyHttpExchange);
View Full Code Here

    }

    @Override
    public Authenticator setAuthenticator(Authenticator auth)
    {
      Authenticator previous = _authenticator;
      _authenticator = auth;
        return previous;
    }
View Full Code Here

        JettyHttpExchange jettyHttpExchange = new JettyHttpExchange(_context, req, resp);
       
        // TODO: add filters processing

        Authenticator auth = _context.getAuthenticator();
        try
        {
          if (auth != null)
              handleAuthentication(resp, jettyHttpExchange, auth);
          else
View Full Code Here

        // TODO: add filters processing

        try
        {
            Authenticator auth = _httpContext.getAuthenticator();
            if (auth != null)
            {
                handleAuthentication(resp,jettyHttpExchange,auth);
            }
            else
View Full Code Here

TOP

Related Classes of com.sun.net.httpserver.Authenticator$Result

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.