1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
<beans xmlns="http://www.springframework.org/schema/beans"
|
3
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
4
|
xmlns:context="http://www.springframework.org/schema/context"
|
5
|
xmlns:security="http://www.springframework.org/schema/security"
|
6
|
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
7
|
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
|
8
|
http://www.springframework.org/schema/context
|
9
|
http://www.springframework.org/schema/context/spring-context-2.5.xsd
|
10
|
http://www.springframework.org/schema/security
|
11
|
http://www.springframework.org/schema/security/spring-security-3.0.4.xsd">
|
12
|
|
13
|
<bean id="authenticationManager" class="org.springframework.security.authentication.ProviderManager">
|
14
|
<property name="providers">
|
15
|
<list>
|
16
|
<ref local="daoAuthenticationProvider"/>
|
17
|
</list>
|
18
|
</property>
|
19
|
</bean>
|
20
|
|
21
|
<bean id="daoAuthenticationProvider" class="org.springframework.security.authentication.dao.DaoAuthenticationProvider">
|
22
|
<property name="userDetailsService" ref="userService"/>
|
23
|
<property name="saltSource" ref="saltSource"/>
|
24
|
<property name="passwordEncoder" ref="passwordEncoder"/>
|
25
|
</bean>
|
26
|
|
27
|
<bean id="passwordEncoder" class="org.springframework.security.authentication.encoding.Md5PasswordEncoder"/>
|
28
|
|
29
|
<bean id="saltSource" class="org.springframework.security.authentication.dao.ReflectionSaltSource">
|
30
|
<property name="userPropertyToUse" value="getUsername"/>
|
31
|
</bean>
|
32
|
|
33
|
<security:global-method-security pre-post-annotations="enabled">
|
34
|
<security:expression-handler ref="expressionHandler"/>
|
35
|
</security:global-method-security>
|
36
|
|
37
|
<bean id="expressionHandler" class="org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler">
|
38
|
<property name="permissionEvaluator" ref="cdmPermissionEvaluator"/>
|
39
|
</bean>
|
40
|
|
41
|
|
42
|
<bean class="eu.etaxonomy.cdm.model.permissionEval.CdmPermissionEvaluator" id="cdmPermissionEvaluator"/>
|
43
|
|
44
|
</beans>
|