Package org.apache.geronimo.jetty8

Examples of org.apache.geronimo.jetty8.Messages


        webServiceContext.start();
        webServices.put(contextPath, webServiceContext);
    }

    public void removeWebService(String contextPath) {
        EJBWebServiceContext webServiceContext = webServices.remove(contextPath);
        try {
            removeContext(webServiceContext);
        } catch (Exception e) {
            throw new IllegalStateException(e.getMessage(), e);
        }
View Full Code Here


            JettySecurityHandlerFactory  factory = new JettySecurityHandlerFactory(builtInAuthMethod, null, null, realmName, configurationFactory);
            //TODO use actual default subject here.
            securityHandler = factory.buildSecurityHandler(contextID, null, null, false);
        }
        ServletHandler servletHandler = new EJBServletHandler(webServiceContainer);
        EJBWebServiceContext webServiceContext = new EJBWebServiceContext(contextPath, securityHandler, servletHandler, classLoader);
        webServiceContext.setVirtualHosts(virtualHosts);
        addContext(webServiceContext);
        webServiceContext.start();
        webServices.put(contextPath, webServiceContext);
    }
View Full Code Here

        webServiceContext.start();
        webServices.put(contextPath, webServiceContext);
    }

    public void removeWebService(String contextPath) {
        EJBWebServiceContext webServiceContext = webServices.remove(contextPath);
        try {
            removeContext(webServiceContext);
        } catch (Exception e) {
            throw new IllegalStateException(e.getMessage(), e);
        }
View Full Code Here

        AccessControlContext defaultAcc = ContextManager.registerSubjectShort(defaultSubject, null, null);
        IdentityService identityService = new JettyIdentityService(defaultAcc, defaultSubject, runAsSource);
        if (checkRolePermissions) {
            return new JaccSecurityHandler(policyContextID, authenticator, loginService, identityService, defaultAcc);
        } else {
            return new EJBWebServiceSecurityHandler(policyContextID, authenticator, loginService, identityService, defaultAcc);
        }
    }
View Full Code Here

        JettyIdentityService identityService = new JettyIdentityService(defaultAcc, defaultSubject, runAsSource);
        final LoginService loginService = new JAASLoginService(realmName, new GeronimoLoginService(configurationFactory, identityService));
        if (checkRolePermissions) {
            return new JaccSecurityHandler(policyContextID, authenticator, loginService, identityService, defaultAcc);
        } else {
            return new EJBWebServiceSecurityHandler(policyContextID, authenticator, loginService, identityService, defaultAcc);
        }
    }
View Full Code Here

        AccessControlContext defaultAcc = ContextManager.registerSubjectShort(defaultSubject, null, null);
        IdentityService identityService = new JettyIdentityService(defaultAcc, defaultSubject, runAsSource);
        if (checkRolePermissions) {
            return new JaccSecurityHandler(policyContextID, authenticator, loginService, identityService, defaultAcc);
        } else {
            return new EJBWebServiceSecurityHandler(policyContextID, authenticator, loginService, identityService, defaultAcc);
        }
    }
View Full Code Here

//            final ServletCallbackHandler callbackHandler = new ServletCallbackHandler(loginService);
            final Subject subject = new Subject();
            final AccessControlContext acc = ContextManager.registerSubjectShort(subject, null);
            securityHandlerFactory = new ServerAuthenticationGBean(new Authenticator() {
                public Authentication validateRequest(ServletRequest request, ServletResponse response, boolean mandatory) throws ServerAuthException {
                    return new UserAuthentication("test", new GeronimoJettyUserIdentity(new JACCUserIdentity(subject, new GeronimoUserPrincipal("foo"), acc)));
                }// most likely validatedUser is not needed here.

                public boolean secureResponse(ServletRequest request, ServletResponse response, boolean mandatory, Authentication.User validatedUser) throws ServerAuthException {
                    return true;
                }
View Full Code Here

    public UserIdentity login(String username, Object credentials) {
        char[] password = credentials instanceof  String? ((String)credentials).toCharArray(): (char[]) credentials;
        CallbackHandler callbackHandler = new PasswordCallbackHandler(username, password);
        org.apache.geronimo.security.jaspi.UserIdentity userIdentity = geronimoLoginService.login(callbackHandler);
        return new GeronimoJettyUserIdentity(userIdentity);
    }
View Full Code Here

    public void unsetRunAs(Object previousToken) {
        ContextManager.popCallers((Callers) previousToken);
    }

    public org.eclipse.jetty.server.UserIdentity newUserIdentity(Subject subject, Principal userPrincipal, String[] roles) {
        return new GeronimoJettyUserIdentity(newUserIdentity(subject));
    }
View Full Code Here

        Subject runAsSubject = runAsSource.getSubjectForRole(runAsName);
        return new GeronimoRunAsToken(runAsSubject);
    }

    public org.eclipse.jetty.server.UserIdentity getSystemUserIdentity() {
        return new GeronimoJettyUserIdentity(newUserIdentity(defaultSubject));
    }
View Full Code Here

TOP

Related Classes of org.apache.geronimo.jetty8.Messages

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.