Package org.apache.geronimo.jetty8.app

Examples of org.apache.geronimo.jetty8.app.MockWebServiceContainer


        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

        ContextManager.popCallers((Callers) previousIdentity);

    }

    public Object setRunAs(UserIdentity userIdentity, RunAsToken token) {
        GeronimoRunAsToken geronimoRunAsToken = (GeronimoRunAsToken) token;
        Subject runAsSubject = geronimoRunAsToken == null? null: geronimoRunAsToken.getRunAsSubject();
        return ContextManager.pushNextCaller(runAsSubject);
    }
View Full Code Here

        return new GeronimoUserIdentity(null, null, defaultAcc);
    }

    public RunAsToken newRunAsToken(String runAsName) {
        Subject runAsSubject = runAsSource.getSubjectForRole(runAsName);
        return new GeronimoRunAsToken(runAsSubject);
    }
View Full Code Here

        ContextManager.popCallers((Callers) previousIdentity);

    }

    public Object setRunAs(org.eclipse.jetty.server.UserIdentity userIdentity, RunAsToken token) {
        GeronimoRunAsToken geronimoRunAsToken = (GeronimoRunAsToken) token;
        Subject runAsSubject = geronimoRunAsToken == null? null: geronimoRunAsToken.getRunAsSubject();
        return ContextManager.pushNextCaller(runAsSubject);
    }
View Full Code Here

        return new GeronimoJettyUserIdentity(newUserIdentity(subject));
    }

    public RunAsToken newRunAsToken(String runAsName) {
        Subject runAsSubject = runAsSource.getSubjectForRole(runAsName);
        return new GeronimoRunAsToken(runAsSubject);
    }
View Full Code Here

TOP

Related Classes of org.apache.geronimo.jetty8.app.MockWebServiceContainer

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.