]> git.argeo.org Git - lgpl/argeo-commons.git/blob - org.argeo.security.dao.ldap/META-INF/spring/security-ldap-services.xml
check-osgi working
[lgpl/argeo-commons.git] / org.argeo.security.dao.ldap / META-INF / spring / security-ldap-services.xml
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 xsi:schemaLocation="
5 http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
6
7 <bean id="authenticationManager"
8 class="org.springframework.security.authentication.ProviderManager">
9 <property name="providers">
10 <list>
11 <ref bean="authByAdapterProvider" />
12 <ref bean="preAuthProvider" />
13 <ref bean="anonymousAuthenticationProvider" />
14 <ref bean="rememberMeAuthenticationProvider" />
15 <ref bean="ldapAuthenticationProvider" />
16 </list>
17 </property>
18 </bean>
19
20 <!-- Authentication provider -->
21 <bean id="authByAdapterProvider" class="org.argeo.security.core.InternalAuthenticationProvider">
22 <description><![CDATA[System authentication]]></description>
23 <property name="key" value="${argeo.security.systemKey}" />
24 </bean>
25
26 <bean id="preAuthProvider"
27 class="org.springframework.security.providers.preauth.PreAuthenticatedAuthenticationProvider">
28 <description><![CDATA[Pre-authentication]]></description>
29 <property name="preAuthenticatedUserDetailsService">
30 <bean id="userDetailsServiceWrapper"
31 class="org.springframework.security.userdetails.UserDetailsByNameServiceWrapper">
32 <property name="userDetailsService" ref="userDetailsManager" />
33 </bean>
34 </property>
35 </bean>
36
37 <bean id="anonymousAuthenticationProvider"
38 class="org.springframework.security.authentication.AnonymousAuthenticationProvider">
39 <description><![CDATA[Anonymous authentication]]></description>
40 <property name="key" value="${argeo.security.systemKey}" />
41 </bean>
42
43 <bean id="rememberMeAuthenticationProvider"
44 class="org.springframework.security.providers.rememberme.RememberMeAuthenticationProvider">
45 <description><![CDATA[Remember me authentication]]></description>
46 <property name="key" value="${argeo.security.systemKey}" />
47 </bean>
48
49 <!-- Internal authentication, used by during the general authentication
50 initialization himself, in order to prevent the following dependency cycle:
51 Repository.login() <= AuthenticationManager <= LdapAuthenticationProvider
52 <= Repository.login() in init() -->
53 <bean id="internalAuthenticationManager"
54 class="org.springframework.security.authentication.ProviderManager">
55 <property name="providers">
56 <list>
57 <ref bean="authByAdapterProvider" />
58 </list>
59 </property>
60 </bean>
61
62 <bean
63 class="org.argeo.security.core.AuthenticatedApplicationContextInitialization">
64 <description><![CDATA[Executes initialization with a system authentication]]></description>
65 <property name="authenticationManager" ref="internalAuthenticationManager" />
66 </bean>
67 </beans>