Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ku-ldap

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ku-ldap

  • 0.0.3
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

KU::LDAP

A client for the Copenhagen University LDAP service.

Installation

Add this line to your application's Gemfile:

gem 'ku-ldap'

And then execute:

$ bundle

Or install it yourself as:

$ gem install ku-ldap

Usage

Users

Find a user by ID:

KU::LDAP.user 'abc123'

Search for users with an attribute matching a given string:

KU::LDAP.users :givenname, 'foo'

The matcher is an optional argument (default :contains):

KU::LDAP.users :givenname, 'oo', :ends

Available matchers:

:begins, :contains, :ends, :eq

Find and authenticate a user by ID and password:

KU::LDAP.authenticate 'abc123', 'password'

User metadata:

user = KU::LDAP.user 'abc123'
user.id
user.first_name
user.last_name
user.full_name
user.title
user.primary_institution
user.department
user.email
user.primary_group
user.groups
user.group_ids

Groups

Find a group by name:

KU::LDAP.group 'foo'

Search for groups with an attribute containing a given string:

KU::LDAP.groups :description, 'foo'

Or, with an alternate matcher:

KU::LDAP.groups :description, 'foo', :begins

Group metadata:

group = KU::LDAP.group 'foo'
group.id
group.description
group.primary_institution
group.members

Group membership:

group.member? 'abc123'

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

FAQs

Package last updated on 24 Apr 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc