Package org.apache.geronimo.security.realm

Examples of org.apache.geronimo.security.realm.GenericSecurityRealm


        JaasLoginModuleUse loginModuleUse = new JaasLoginModuleUse(loginModule, null, LoginModuleControlFlag.REQUIRED);

        PrincipalInfo.PrincipalEditor principalEditor = new PrincipalInfo.PrincipalEditor();
        principalEditor.setAsText("metro,org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal");
        GenericSecurityRealm realm = new GenericSecurityRealm(domainName, loginModuleUse, true, serverInfo, cl, null);

        loginConfiguration = new GeronimoLoginConfiguration();
        loginConfiguration.setConfigurations(Collections.<ConfigurationEntryFactory>singleton(realm));
        loginConfiguration.doStart();
View Full Code Here


    }

    private void doTest(boolean wrapPrincipals, String realmName) throws ClassNotFoundException, LoginException {
        LoginModuleGBean module = new LoginModuleGBean(MockLoginModule.class.getName(), "foo", true, new HashMap<String, Object>(), "domain", getClass().getClassLoader());
        JaasLoginModuleUse loginModuleUse = new JaasLoginModuleUse(module, null, LoginModuleControlFlag.REQUIRED);
        GenericSecurityRealm realm = new GenericSecurityRealm(realmName,
                loginModuleUse,
                wrapPrincipals,
                null,
                getClass().getClassLoader(),
                null);
View Full Code Here

        JaasLoginModuleUse loginModuleUse = new JaasLoginModuleUse(loginModule, null, LoginModuleControlFlag.REQUIRED);

        PrincipalInfo.PrincipalEditor principalEditor = new PrincipalInfo.PrincipalEditor();
        principalEditor.setAsText("metro,org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal");
        GenericSecurityRealm realm = new GenericSecurityRealm(domainName, loginModuleUse, true, serverInfo, cl, null);

        loginConfiguration = new GeronimoLoginConfiguration();
        loginConfiguration.setConfigurations(Collections.<ConfigurationEntryFactory>singleton(realm));
        loginConfiguration.doStart();
View Full Code Here

        JaasLoginService loginService = new JaasLoginService("HmacSHA1", "secret", cl, null);

        PrincipalInfo.PrincipalEditor principalEditor = new PrincipalInfo.PrincipalEditor();
        principalEditor.setAsText("metro,org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal,false");
        GenericSecurityRealm realm = new GenericSecurityRealm(domainName, loginModuleUse, true, true, (PrincipalInfo) principalEditor.getValue(), serverInfo,  cl, null, loginService);

        loginService.setRealms(Collections.singleton(realm));
        loginService.doStart();

        GeronimoLoginConfiguration loginConfiguration = new GeronimoLoginConfiguration();
View Full Code Here

        JaasLoginService loginService = new JaasLoginService("HmacSHA1", "secret", cl, null);

        PrincipalInfo.PrincipalEditor principalEditor = new PrincipalInfo.PrincipalEditor();
        principalEditor.setAsText("metro,org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal,false");
        GenericSecurityRealm realm = new GenericSecurityRealm(domainName, loginModuleUse, true, true, (PrincipalInfo) principalEditor.getValue(), serverInfo, cl, null, loginService);

        loginService.setRealms(Collections.singleton(realm));
        loginService.doStart();

        loginConfiguration = new GeronimoLoginConfiguration();
View Full Code Here

        JaasLoginService loginService = new JaasLoginService("HmacSHA1", "secret", cl, null);

        PrincipalInfo.PrincipalEditor principalEditor = new PrincipalInfo.PrincipalEditor();
        principalEditor.setAsText("metro,org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal,false");
        GenericSecurityRealm realm = new GenericSecurityRealm(domainName, loginModuleUse, true, true, (PrincipalInfo) principalEditor.getValue(), serverInfo, cl, null, loginService);

        loginService.setRealms(Collections.singleton(realm));
        loginService.doStart();

        loginConfiguration = new GeronimoLoginConfiguration();
View Full Code Here

        JaasLoginService loginService = new JaasLoginService("HmacSHA1", "secret", cl, null);

        PrincipalInfo.PrincipalEditor principalEditor = new PrincipalInfo.PrincipalEditor();
        principalEditor.setAsText("metro,org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal,false");
        GenericSecurityRealm realm = new GenericSecurityRealm(domainName, loginModuleUse, true, true, (PrincipalInfo) principalEditor.getValue(), serverInfo,  cl, null, loginService);

        loginService.setRealms(Collections.singleton(realm));
        loginService.doStart();

        GeronimoLoginConfiguration loginConfiguration = new GeronimoLoginConfiguration();
View Full Code Here

        JaasLoginModuleUse loginModuleUse = new JaasLoginModuleUse(loginModule, null, LoginModuleControlFlag.REQUIRED);

        PrincipalInfo.PrincipalEditor principalEditor = new PrincipalInfo.PrincipalEditor();
        principalEditor.setAsText("metro,org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal");
        GenericSecurityRealm realm = new GenericSecurityRealm(domainName, loginModuleUse, true, serverInfo,  cl, null);

        GeronimoLoginConfiguration loginConfiguration = new GeronimoLoginConfiguration();
        loginConfiguration.setConfigurations(Collections.<ConfigurationEntryFactory>singleton(realm));
        loginConfiguration.doStart();
View Full Code Here

    }

    private void doTest(boolean wrapPrincipals, String realmName) throws ClassNotFoundException, LoginException {
        LoginModuleGBean module = new LoginModuleGBean(MockLoginModule.class.getName(), "foo", true, new HashMap<String, Object>(), "domain", getClass().getClassLoader());
        JaasLoginModuleUse loginModuleUse = new JaasLoginModuleUse(module, null, LoginModuleControlFlag.REQUIRED);
        GenericSecurityRealm realm = new GenericSecurityRealm(realmName,
                loginModuleUse,
                wrapPrincipals,
                null,
                getClass().getClassLoader(),
                null);
View Full Code Here

        PrincipalInfo.PrincipalEditor principalEditor = new PrincipalInfo.PrincipalEditor();
        principalEditor.setAsText("metro,org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal");
        Bundle bundle = new MockBundle(cl, "", -1);
        ProxyLoginModule.init(new MockBundleContext(bundle));
        realm = new GenericSecurityRealm(domainName, loginModuleUse, true, true, serverInfo, bundle, null);
    }
View Full Code Here

TOP

Related Classes of org.apache.geronimo.security.realm.GenericSecurityRealm

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.