Examples of JaasNameCallbackHandler


Examples of org.springframework.security.authentication.jaas.JaasNameCallbackHandler

    }

    private void testConfigureJaasCase(JaasAuthenticationProvider p1, JaasAuthenticationProvider p2) throws Exception {
        p1.setLoginConfig(new ClassPathResource(resolveConfigFile("/test1.conf")));
        p1.setLoginContextName("test1");
        p1.setCallbackHandlers(new JaasAuthenticationCallbackHandler[] {new TestCallbackHandler(), new JaasNameCallbackHandler(), new JaasPasswordCallbackHandler()});
        p1.setAuthorityGranters(new AuthorityGranter[] {new TestAuthorityGranter()});
        p1.afterPropertiesSet();
        testAuthenticate(p1);

        p2.setLoginConfig(new ClassPathResource(resolveConfigFile("/test2.conf")));
        p2.setLoginContextName("test2");
        p2.setCallbackHandlers(new JaasAuthenticationCallbackHandler[] {new TestCallbackHandler(), new JaasNameCallbackHandler(), new JaasPasswordCallbackHandler()});
        p2.setAuthorityGranters(new AuthorityGranter[] {new TestAuthorityGranter()});
        p2.afterPropertiesSet();
        testAuthenticate(p2);
    }
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.