Zionetrix::Git
Repositories
Help
Report an Issue
cas-common-config
Code
Commits
Branches
Tags
Search
Tree:
554f8b0
Branches
Tags
master
cas-common-config
custom
webpages
WEB-INF
auth-configuration
ldap-auth.xml
Transformed ldapHandler from FastBindLdapAuthenticationHandler to BindLdapAuthenticationHandler
Benjamin Renard
commited
554f8b0
at 2014-12-11 13:55:22
ldap-auth.xml
Blame
History
Raw
<?xml version="1.0" encoding="UTF-8"?> <!-- | deployerConfigContext.xml centralizes into one file some of the declarative configuration that | all CAS deployers will need to modify. | | This file declares some of the Spring-managed JavaBeans that make up a CAS deployment. | The beans declared in this file are instantiated at context initialization time by the Spring | ContextLoaderListener declared in web.xml. It finds this file because this | file is among those declared in the context parameter "contextConfigLocation". | | By far the most common change you will need to make in this file is to change the last bean | declaration to replace the default SimpleTestUsernamePasswordAuthenticationHandler with | one implementing your approach for authenticating usernames and passwords. +--> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"> <!-- | LDAP authentication. +--> <bean id="contextSource" class="org.springframework.ldap.core.support.LdapContextSource"> <property name="anonymousReadOnly" value="false" /> <property name="pooled" value="false" /> <property name="urls"> <list> <value>${ldap.host.1}</value> <value>${ldap.host.2}</value> </list> </property> <property name="baseEnvironmentProperties"> <map> <!-- <entry> <key><value>java.naming.security.protocol</value></key> <value>ssl</value> </entry> --> <entry> <key><value>java.naming.security.authentication</value></key> <value>simple</value> </entry> </map> </property> </bean> <bean id="ldapHandler" class="org.jasig.cas.adaptors.ldap.BindLdapAuthenticationHandler"> <property name="filter" value="(|(uid=%u)(mail=%u))" /> <property name="searchBase" value="${ldap.basedn}" /> <property name="contextSource" ref="contextSource" /> </bean> </beans>