Java 如何通过Spring检查OpenLdap密码策略相关错误和操作属性?
我们使用SpringSecurity3.2.3版本在应用程序中验证和访问OpenLdap。我通过Spring上下文访问PPolicy属性和错误时遇到问题。它是一个密码文本Java 如何通过Spring检查OpenLdap密码策略相关错误和操作属性?,java,spring,spring-security,openldap,spring-ldap,Java,Spring,Spring Security,Openldap,Spring Ldap,我们使用SpringSecurity3.2.3版本在应用程序中验证和访问OpenLdap。我通过Spring上下文访问PPolicy属性和错误时遇到问题。它是一个密码文本 <bean id="contextSource class="org.springframework.security.ldap.ppolicy.PasswordPolicyAwareContextSource"> <constructor-arg value="${ldap.url}" />
<bean id="contextSource class="org.springframework.security.ldap.ppolicy.PasswordPolicyAwareContextSource">
<constructor-arg value="${ldap.url}" />
<property name="password" value="${ldap.password}" />
<property name="userDn" value="${ldap.userDN}" />
</bean>
<bean id="springSecurityLdapTemplate" class="org.springframework.security.ldap.SpringSecurityLdapTemplate">
<constructor-arg ref="contextSource"/>
</bean>
<bean id="userDetailsContextMapper" class="LdapUserProfilePopulator"/>
您似乎已经自己回答了(1)。您好@EJP谢谢您的回答。我目前正在做以下工作:catch(异常异常)
{if(异常实例oforg.springframework.security.authentication.LockedException)
{抛出新的BaseException(“帐户锁定”,异常);
}..我们如何使用PasswordPolicyErrorStatus?谢谢!有人能告诉我如何通过Spring获取LDAP属性(如pwdMaxAge、pwdExpireWarning等)的参考/文档吗?