Search in sources :

Example 1 with SecurityInterceptorConfig

use of com.hazelcast.config.SecurityInterceptorConfig in project hazelcast by hazelcast.

the class SecureApplicationContextTest method testSecurityInterceptors.

@Test
public void testSecurityInterceptors() {
    List<SecurityInterceptorConfig> interceptorConfigs = securityConfig.getSecurityInterceptorConfigs();
    assertEquals(1, interceptorConfigs.size());
    SecurityInterceptorConfig interceptorConfig = interceptorConfigs.get(0);
    String className = interceptorConfig.getClassName();
    assertEquals(DummySecurityInterceptor.class.getName(), className);
    SecurityInterceptor securityInterceptor = interceptorConfig.getImplementation();
    assertTrue(securityInterceptor instanceof DummySecurityInterceptor);
}
Also used : SecurityInterceptor(com.hazelcast.security.SecurityInterceptor) SecurityInterceptorConfig(com.hazelcast.config.SecurityInterceptorConfig) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test)

Example 2 with SecurityInterceptorConfig

use of com.hazelcast.config.SecurityInterceptorConfig in project hazelcast by hazelcast.

the class MemberDomConfigProcessor method handleSecurityInterceptorsChild.

protected void handleSecurityInterceptorsChild(SecurityConfig cfg, Node child) {
    String nodeName = cleanNodeName(child);
    if (matches("interceptor", nodeName)) {
        Node classNameNode = getNamedItemNode(child, "class-name");
        String className = getTextContent(classNameNode);
        cfg.addSecurityInterceptorConfig(new SecurityInterceptorConfig(className));
    }
}
Also used : Node(org.w3c.dom.Node) SecurityInterceptorConfig(com.hazelcast.config.SecurityInterceptorConfig)

Example 3 with SecurityInterceptorConfig

use of com.hazelcast.config.SecurityInterceptorConfig in project hazelcast by hazelcast.

the class TestSecureApplicationContext method testSecurityInterceptors.

@Test
public void testSecurityInterceptors() {
    List<SecurityInterceptorConfig> interceptorConfigs = securityConfig.getSecurityInterceptorConfigs();
    assertEquals(1, interceptorConfigs.size());
    SecurityInterceptorConfig interceptorConfig = interceptorConfigs.get(0);
    String className = interceptorConfig.getClassName();
    assertEquals(DummySecurityInterceptor.class.getName(), className);
    SecurityInterceptor securityInterceptor = interceptorConfig.getImplementation();
    assertTrue(securityInterceptor instanceof DummySecurityInterceptor);
}
Also used : SecurityInterceptor(com.hazelcast.security.SecurityInterceptor) SecurityInterceptorConfig(com.hazelcast.config.SecurityInterceptorConfig) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test)

Example 4 with SecurityInterceptorConfig

use of com.hazelcast.config.SecurityInterceptorConfig in project hazelcast by hazelcast.

the class YamlMemberDomConfigProcessor method handleSecurityInterceptorsChild.

@Override
protected void handleSecurityInterceptorsChild(SecurityConfig cfg, Node child) {
    String className = child.getTextContent();
    cfg.addSecurityInterceptorConfig(new SecurityInterceptorConfig(className));
}
Also used : SecurityInterceptorConfig(com.hazelcast.config.SecurityInterceptorConfig)

Aggregations

SecurityInterceptorConfig (com.hazelcast.config.SecurityInterceptorConfig)4 SecurityInterceptor (com.hazelcast.security.SecurityInterceptor)2 QuickTest (com.hazelcast.test.annotation.QuickTest)2 Test (org.junit.Test)2 Node (org.w3c.dom.Node)1