Hi Sobhen,
Would like to know more about your setup first, see if the below correctly describe your setup:
- You setup your properties in:
- You extend the LdapAutheticationHandler and make your own CustomLdapAutneticaiontHandler, using the same cas.authn.ldap[0] as your source of Authentication
- You just intend to use the CustomLdapAuthentcaionHandler, the LdapAuthentcaiontHandler is should be disabled for all service
If the above correctly describe your setup, then here's are some idea for fix (Not tested)
Fix #1, disabled LdapAutheticationHandler (Quick fix):
- Setup requiredAuthenticationHandlers for your service, set it to only CustomLdapAutneticaiontHandler
- Then, LdapAuthentcaiontHandler would never be called for your service
- This fix would have a problem of, if user going to
https://cas.server/cas/login directly and login, they still would called to LdapAuthenticationHandler and that cannot be blocked from my understanding
Fix #2, override the LdapAuthenticaitonHandlers beans, and inject your own custom authentiaction handler:
- That case, the default LadpAuthticationHandler willl not be used
Fix #3, use your own properties:
- Instead of using cas.authn.ldap[0], which will setup and make LdapAuthentcaiontHander available, you can actually:
- In your CustomerLdapAutneticainotHandler, make sure the properties is point to your own properties
While all of them should works, if I would to setup something like this I would go for Fix #3.
See if this would be helpful to you,
Cheers.
- Andy