Micho Rizo
Micho Rizo

Reputation: 1092

LDAP Pac4j, disable PasswordPolicyControl

I'm getting an error when validate user credentials against my LDAP system. Is there a way to disable the PasswordPolicyControl being called from LdaptiveAuthenticatorBuilder in v5.4.6?

authenticationResultCode=AUTHENTICATION_HANDLER_FAILURE, resultCode=INSUFFICIENT_ACCESS_RIGHTS, matchedDN=, diagnosticMessage=The request control with Object Identifier (OID) "1.3.6.1.4.1.42.2.27.8.5.1" cannot be used due to insufficient access rights, referralURLs=[], messageID=3, controls=[]]

Upvotes: 0

Views: 31

Answers (1)

jleleu
jleleu

Reputation: 2699

Currently, you cannot disable the PasswordPolicyControl.

Though, if you are in a JEE environment, you may duplicate the LdaptiveAuthenticatorBuilder class in your project (same package, same name) and comment/remove the line: handler.setAuthenticationControls(new PasswordPolicyControl());. The overriden class will be taken into account before the one in the pac4j-ldap JAR.

Upvotes: 0

Related Questions