开发者

ldap integration in ruby

开发者 https://www.devze.com 2022-12-30 06:40 出处:网络
I\'m working on integrating ruby with ldap. And it\'s working fine. Created test.com in ldap and I can bind with it successfully.

I'm working on integrating ruby with ldap. And it's working fine.

Created test.com in ldap and I can bind with it successfully.

Then I created a new organizational unit com开发者_开发知识库pany. Under company there are some users

Now I want to bind with the users(authentication) under company organizational unit.

I can access the user using Filter.eq

But I want to bind with the users. Suggestions plz..


Assuming you are using "activeldap" gem you could do this (in your Model):

ldap_mapping :dn_attribute => 'cn', :prefix => 'ou=company', :classes => ['inetOrgPerson']

So now you can instantiate users by "cn" and then authenticate by whatever password field you have defined.

0

精彩评论

暂无评论...
验证码 换一张
取 消