Added ldap-auth.xml file from update directory (cas-toolbox-3.4.7-1)
Benjamin Renard

Benjamin Renard commited on 2014-12-11 13:37:26
Showing 1 changed files, with 52 additions and 0 deletions.

... ...
@@ -0,0 +1,52 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!--
3
+	| deployerConfigContext.xml centralizes into one file some of the declarative configuration that
4
+	| all CAS deployers will need to modify.
5
+	|
6
+	| This file declares some of the Spring-managed JavaBeans that make up a CAS deployment.  
7
+	| The beans declared in this file are instantiated at context initialization time by the Spring 
8
+	| ContextLoaderListener declared in web.xml.  It finds this file because this
9
+	| file is among those declared in the context parameter "contextConfigLocation".
10
+	|
11
+	| By far the most common change you will need to make in this file is to change the last bean
12
+	| declaration to replace the default SimpleTestUsernamePasswordAuthenticationHandler with
13
+	| one implementing your approach for authenticating usernames and passwords.
14
+	+-->
15
+<beans xmlns="http://www.springframework.org/schema/beans"
16
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
17
+       xmlns:p="http://www.springframework.org/schema/p"
18
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
19
+	
20
+	<!--
21
+		|    LDAP authentication.
22
+	+-->
23
+	<bean id="ldapHandler" class="org.jasig.cas.adaptors.ldap.FastBindLdapAuthenticationHandler" lazy-init="true">
24
+		<property name="filter" value="${ldap.basedn}" />
25
+		<property name="contextSource">
26
+			<bean id="contextSource" class="org.springframework.ldap.core.support.LdapContextSource">
27
+				<property name="anonymousReadOnly" value="false" />
28
+				<property name="pooled" value="false" />
29
+				<property name="urls">
30
+					<list>
31
+						<value>${ldap.host.1}</value>
32
+						<value>${ldap.host.2}</value>
33
+					</list>
34
+				</property>
35
+				<property name="baseEnvironmentProperties">
36
+					<map>
37
+						<!-- 
38
+						<entry>
39
+						    <key><value>java.naming.security.protocol</value></key>
40
+		        			<value>ssl</value>
41
+		        		</entry>
42
+		        		-->
43
+						<entry>
44
+						        <key><value>java.naming.security.authentication</value></key>
45
+		        				<value>simple</value>
46
+		        			</entry>
47
+		        		</map>
48
+				</property>
49
+			</bean>				
50
+		</property>
51
+	</bean>
52
+</beans>
0 53
\ No newline at end of file
1 54