posted 9 years ago
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