security.xml 1.64 KB
Newer Older
Peter Harrison's avatar
Peter Harrison committed
1 2 3 4
<beans:beans xmlns="http://www.springframework.org/schema/security"
    xmlns:beans="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.org/schema/beans 
5
                    http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
Peter Harrison's avatar
Peter Harrison committed
6 7 8
                    http://www.springframework.org/schema/security 
                    http://www.springframework.org/schema/security/spring-security-3.1.xsd">
                    
9
    <http use-expressions="true" auto-config="true">
Peter Harrison's avatar
Peter Harrison committed
10 11 12 13 14
        <intercept-url pattern="/spring/**" access="isAuthenticated()" />
        <http-basic />
        <!--  <form-login /> -->
    </http>
        
15
    <beans:bean id="securityTool" class="nz.net.orcon.kanban.security.SecurityToolImpl"/>
Peter Harrison's avatar
Peter Harrison committed
16 17
	
    <beans:bean id="nullAuthenticationProvider" class="nz.net.orcon.kanban.security.NullAuthenticationProvider"/>
18 19
    
    <beans:bean id="jcrAuthenticationProvider" class="nz.net.orcon.kanban.security.JcrAuthenticationProvider"/>
Peter Harrison's avatar
Peter Harrison committed
20 21 22 23 24 25 26 27 28 29 30 31

	<beans:bean id="expressionHandler" class="org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler">
		<beans:property name="permissionEvaluator" ref="gravityPermissionEvaluator"/>
	</beans:bean>
	
	<beans:bean id="gravityPermissionEvaluator" class="nz.net.orcon.kanban.security.GravityPermissionEvaluator"/>

	<global-method-security pre-post-annotations="enabled">
		<expression-handler ref="expressionHandler"/>
	</global-method-security>
	
   	<authentication-manager>
32
   		<authentication-provider ref="jcrAuthenticationProvider"/>
Peter Harrison's avatar
Peter Harrison committed
33 34 35 36
   	</authentication-manager>  

	    
</beans:beans>