I am using Spring Ldap to manger the interaction betweel application and the Ldap Server, & I am having a requirement to allow password changes through this API. The target server would be implementing a password policy and hence I would like to capture different password violations and pass them back to the user. Much like the example in;
What is the spring ldap recommended way for doing this. Is there any support from spring-ldap/securtiy I can use(something like LdapAuthenticationProvider).
Or should I simply use
and if an exception is thrown look at LdapContext.getRequestControls() for additional details for failure.
Any guidance is appreciated!
LdapContext ldapCtx =(LdapContext)ldapTemplate.getContextSource().getReadWriteContext();
Control ctrl = ldapCtx.getRequestControls();