Sample code for CAS and LDAP