private static Authenticator getActiveDirectoryAuthenticator(final LdapAuthenticationProperties l) {
        if (StringUtils.isBlank(l.getDnFormat())) {
            throw new IllegalArgumentException("Dn format cannot be empty/blank for active directory authentication");
        }
        val resolver = new FormatDnResolver(l.getDnFormat());
        val authn = new Authenticator(resolver, getPooledBindAuthenticationHandler(l));

        if (l.isEnhanceWithEntryResolver()) {
            authn.setEntryResolver(newSearchEntryResolver(l));
        }

        if (l.isEnablePasswordPolicy()) {
            authn.setResponseHandlers(new ActiveDirectoryAuthenticationResponseHandler());
        }
        return authn;
    }
<p>getAuthenticator.</p>

@param l a {@link LdapAuthenticationProperties} object
@return a {@link Authenticator} object
pac4j-config/src/main/java/org/pac4j/config/ldaptive/LdaptiveAuthenticatorBuilder.java