Blueauth Build Status

The purpose of this gem is to allow IBMers to search and authenticate user that are registered in IBM's Enterprise Directory. This gem can only be used in IBM's Intranet network. Every IBM employee can be searched based on his/her Intraned ID, or Notes ID, or Common name.

Installation

Add this line to your application's Gemfile:

gem 'blueauth'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install blueauth

Usage

Search for a user if she/he exists in IBM's Enterprise Directory

The userid can be Intranet ID or Notes ID or Common name

  blueauth = Blueauth.new
  blueauth.search '[email protected]'
  blueauth.search 'Istvan Kovacs/Hungary/IBM'
  blueauth.search 'Istvan Kovacs'

If the user is found, then the returned object will be a hash: :country, :intranetid, :dn. If the user is not found, then nil

Search for a user's Bluegroups

First, the user must exist in Enterprise Directory, and the Bluegroup can be queried based on the DN of the user

  blueauth = Blueauth.new
  user = blueauth.search '[email protected]'
  blueauth.bluegroups user[:dn]

Returned object will be an Array of strings containing the names of Bluegroups where the user is assigned to.

Authenticate a user with his/her password

The userid can be Intranet ID or Notes ID or Common name

  blueauth = Blueauth.new
  blueauth.authenticate '[email protected]', 'password'
  blueauth.authenticate 'Istvan Kovacs/Hungary/IBM', 'password'
  blueauth.authenticate 'Istvan Kovacs', 'password'

If the user is found, then the returned object will be a hash: :country, :intranetid, :dn, :groups. Groups is an array containing all Bluegroups. If the user is not found, then nil

In case of any problem with LDAP server will throw an Exception

Blueauth::BlueError