Closed bk322 closed 8 years ago
Is there a way to check if devise_ldap_authenticatable can bind as admin? I provided all credentials, but the notorious get_ldap_param does not work.
get_ldap_param
Basically I just used the same dn and password I use with net-ldap. And it works there. But I get:
dn
net-ldap
(byebug) Devise::LDAP::Adapter.get_ldap_param(self.email, "FirstName") LDAP: LDAP search for login: mail=email_that_works@ldap.my LDAP: LDAP search yielded 0 matches LDAP: Requested ldap entry does not exist nil
Oh, I found a solution. One has to add
config.ldap_auth_username_builder = Proc.new() {|attribute, login, ldap| "#{login}" }
to config/initializers/device.rb. source
config/initializers/device.rb
Is there a way to check if devise_ldap_authenticatable can bind as admin? I provided all credentials, but the notorious
get_ldap_param
does not work.Basically I just used the same
dn
and password I use withnet-ldap
. And it works there. But I get: