Skip to content
This repository has been archived by the owner on Nov 3, 2017. It is now read-only.

Configuring BindLdapAuthenticationHandler with a custom XML element

Dmitriy Kopylenko edited this page Jul 19, 2013 · 5 revisions

Since version 1.6 there is a custom element in cas-addons XML schema for configuring CAS' BindLdapAuthenticationHandler beans. As always, it adds domain specific view to the bean configuration element, as well as simplifies the configuration by consolidating 2 bean definitions (LdapContextSource and BindLdapAuthenticationHandler) under one compact configuration element with sensible default values.

A minimal bean definition which produces an instance of BindLdapAuthenticationHandler looks like this:

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:cas="http://unicon.net/schema/cas"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
                           http://www.springframework.org/schema/beans/spring-beans.xsd
                           http://unicon.net/schema/cas
                           http://unicon.net/schema/cas/cas-addons.xsd">

   <cas:bind-ldap-authentication-handler id="ldapAuthnHandler"
                                          user-dn="user"
                                          password="pass"
                                          urls="ldaps://ldap1, ldaps://ldap2"
                                          filter="sAMAccountName=%u"
                                          search-base="OU=users"/>

</beans>                                                  

(Note: id attribute is optional)

Clone this wiki locally