I am trying to authenticate users on my site with their LDAP credentials. However the bind to the active directory seems to require my credentials first before I can authenticate any other username/passwords.
I don't want to hardcode my credentials in the application. Any suggestions?
$self->authen->config(
DRIVER => [ 'Authen::Simple::LDAP',
host => 'ldapad.company.com',
basedn => 'OU=XXX,OU=AD,DC=YYY,DC=ZZZ',
binddn => 'CN=myname,OU=Users,OU=company,OU=AD,DC=company,DC=ZZZ',
bindpw => 'secret',
filter => '(cn=%s)',
],
CREDENTIALS => [ 'authen_username', 'authen_password' ],
STORE => 'Session',
LOGOUT_RUNMODE => 'logout',
LOGIN_RUNMODE => 'login',
POST_LOGIN_RUNMODE => 'okay',
RENDER_LOGIN => \&my_login_form,
);