Examples of FallbackPrincipalProvider


Examples of org.apache.jackrabbit.core.security.principal.FallbackPrincipalProvider

    private static final String APP_NAME = LoginModuleTest.class.getName();

    public void testMultipleModules() throws Exception {

        CallbackHandler ch = new CallbackHandlerImpl(new SimpleCredentials("user", "pass".toCharArray()),
                superuser, new ProviderRegistryImpl(new FallbackPrincipalProvider()),
                "admin", "anonymous");
        LoginContext context = new LoginContext(
                APP_NAME, new Subject(), ch, new TestConfiguration());
        context.login();
        assertFalse("no principal set", context.getSubject().getPrincipals().isEmpty());
View Full Code Here

Examples of org.apache.jackrabbit.core.security.principal.FallbackPrincipalProvider

        }
    }

    private AuthContext getAuthContext(Credentials creds, String config) throws RepositoryException {
        CallbackHandler ch = new CallbackHandlerImpl(creds,
                securitySession, new ProviderRegistryImpl(new FallbackPrincipalProvider()),
                "admin", "anonymous");
        return new LocalAuthContext(getLoginModuleConfig(config), ch, null);
    }
View Full Code Here

Examples of org.apache.jackrabbit.core.security.principal.FallbackPrincipalProvider

        return new LocalAuthContext(getLoginModuleConfig(config), ch, null);
    }

    private AuthContext getJAASAuthContext(Credentials creds, String appName) {
        CallbackHandler ch = new CallbackHandlerImpl(creds,
                securitySession, new ProviderRegistryImpl(new FallbackPrincipalProvider()),
                "admin", "anonymous");
        return new JAASAuthContext(appName, ch, null);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.