• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

Question on ActiveDirectoryLdapAuthenticationProvider in spring security

Ranch Hand
Posts: 220
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I configured spring security in my web app to authenticate against the LDAP server via ActiveDirectoryLdapAuthenticationProvider class, like

<beans:bean id="ldapActiveDirectoryAuthProvider" class="org.springframework.security.ldap.authentication.ad.ActiveDirectoryLdapAuthenticationProvider">
<beans:constructor-arg value="${login.ad.domain}" />
<beans:constructor-arg value="${login.ad.host}" />
<beans:property name="authoritiesMapper" ref="grantedAuthoritiesMapper" />
<beans:property name="useAuthenticationRequestCredentials" value="true" />
<beans:property name="convertSubErrorCodesToExceptions" value="true" />
<beans:property name="userDetailsContextMapper">
<beans:bean class="org.springframework.security.ldap.userdetails.InetOrgPersonContextMapper" />

And then I login to the web app and got the error User must reset password. As convertSubErrorCodesToExceptions has been set to true, it is supposed to throw a specific exception. I would like to handle this exception but don't know how to handle it or where to handle it. I have google in the net but got no answer or even similar answer.

Please advise if any expert of you all can help.

Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic