Package org.apache.camel.component.spring.security

Examples of org.apache.camel.component.spring.security.SpringSecurityAuthorizationPolicy$AuthorizeDelegateProcess


    }
   
    @Test
    public void testAuthorizationPolicy() {
               
        SpringSecurityAuthorizationPolicy adminPolicy = context.getBean("admin", SpringSecurityAuthorizationPolicy.class);
        assertNotNull("We should get admin policy", adminPolicy);
        assertNotNull("The accessDecisionManager should not be null", adminPolicy.getAccessDecisionManager());
        assertNotNull("The authenticationManager should not be null", adminPolicy.getAuthenticationManager());
        assertNotNull("The springSecurityAccessPolicy should not be null", adminPolicy.getSpringSecurityAccessPolicy());
       
        SpringSecurityAuthorizationPolicy userPolicy = context.getBean("user", SpringSecurityAuthorizationPolicy.class);
        assertNotNull("We should get user policy", userPolicy);
        assertNotNull("The accessDecisionManager should not be null", userPolicy.getAccessDecisionManager());
        assertNotNull("The authenticationManager should not be null", userPolicy.getAuthenticationManager());
        assertNotNull("The springSecurityAccessPolicy should not be null", userPolicy.getSpringSecurityAccessPolicy());
       
        assertEquals("user policy and admin policy should have same accessDecisionManager", adminPolicy.getAccessDecisionManager(), userPolicy.getAccessDecisionManager());
        assertEquals("user policy and admin policy should have same authenticationManager", adminPolicy.getAuthenticationManager(), userPolicy.getAuthenticationManager());
    }
View Full Code Here


    }
   
    @Test
    public void testAuthorizationPolicy() {
               
        SpringSecurityAuthorizationPolicy adminPolicy = (SpringSecurityAuthorizationPolicy) context.getBean("admin");
        assertNotNull("We should get admin policy", adminPolicy);
        assertNotNull("The accessDecisionManager should not be null", adminPolicy.getAccessDecisionManager());
        assertNotNull("The authenticationManager should not be null", adminPolicy.getAuthenticationManager());
        assertNotNull("The springSecurityAccessPolicy should not be null", adminPolicy.getSpringSecurityAccessPolicy());
       
        SpringSecurityAuthorizationPolicy userPolicy = (SpringSecurityAuthorizationPolicy) context.getBean("user");
        assertNotNull("We should get user policy", userPolicy);
        assertNotNull("The accessDecisionManager should not be null", userPolicy.getAccessDecisionManager());
        assertNotNull("The authenticationManager should not be null", userPolicy.getAuthenticationManager());
        assertNotNull("The springSecurityAccessPolicy should not be null", userPolicy.getSpringSecurityAccessPolicy());
       
        assertEquals("user policy and admin policy should have same accessDecisionManager", adminPolicy.getAccessDecisionManager(), userPolicy.getAccessDecisionManager());
        assertEquals("user policy and admin policy should have same authenticationManager", adminPolicy.getAuthenticationManager(), userPolicy.getAuthenticationManager());
    }
View Full Code Here

    }
   
    @Test
    public void testAuthorizationPolicy() {
               
        SpringSecurityAuthorizationPolicy adminPolicy = context.getBean("admin", SpringSecurityAuthorizationPolicy.class);
        assertNotNull("We should get admin policy", adminPolicy);
        assertNotNull("The accessDecisionManager should not be null", adminPolicy.getAccessDecisionManager());
        assertNotNull("The authenticationManager should not be null", adminPolicy.getAuthenticationManager());
        assertNotNull("The springSecurityAccessPolicy should not be null", adminPolicy.getSpringSecurityAccessPolicy());
       
        SpringSecurityAuthorizationPolicy userPolicy = context.getBean("user", SpringSecurityAuthorizationPolicy.class);
        assertNotNull("We should get user policy", userPolicy);
        assertNotNull("The accessDecisionManager should not be null", userPolicy.getAccessDecisionManager());
        assertNotNull("The authenticationManager should not be null", userPolicy.getAuthenticationManager());
        assertNotNull("The springSecurityAccessPolicy should not be null", userPolicy.getSpringSecurityAccessPolicy());
       
        assertEquals("user policy and admin policy should have same accessDecisionManager", adminPolicy.getAccessDecisionManager(), userPolicy.getAccessDecisionManager());
        assertEquals("user policy and admin policy should have same authenticationManager", adminPolicy.getAuthenticationManager(), userPolicy.getAuthenticationManager());
    }
View Full Code Here

TOP

Related Classes of org.apache.camel.component.spring.security.SpringSecurityAuthorizationPolicy$AuthorizeDelegateProcess

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.