From https://redmine.pfsense.org/issues/5112 :
With some help from PiBa-NL via IRC I can confirm that the hackish approach works fine.
$authcfg = auth_get_authserver("YOUR LDAP BACKEND NAME");
$_attributes = array();
$loginok = authenticate_user($_POST['auth_user'], $_POST['auth_pass'], $authcfg, $_attributes);
I then uncommented the privilege checking. I hope I find the time to layout changes in a github PR and would like some guidance on how the new configuration options should be structured. It can get complicated if one wishes, but there I will not help much.
I thus consider this thread to be closed, but are happy to find collaborators for a github PR (join me on https://redmine.pfsense.org/issues/5112 ). Thanks.