• 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 ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

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" />
</beans:property>
</beans:bean>

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.


Thanks
reply
    Bookmark Topic Watch Topic
  • New Topic