Skip to content

daporter/anu-ldap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AnuLdap

Description

AnuLdap is a Ruby module for easily querying the ANU LDAP server.

Install

$ gem install anu-ldap

Usage

require "anu-ldap"

# Find users by email address:

entries = AnuLdap.find_by_email("[email protected]")
entries.each do |e|
  puts "Uni ID:     #{e[:uni_id]}"
  puts "Email:      #{e[:email]}"
  puts "Given name: #{e[:given_name]}"
  puts "Surname:    #{e[:surname]}"
end

# Authenticate a user:

if AnuLdap.authenticate("u3990518", "secret")
   puts "Successfully authenticated"
else
   puts "Authentication failure"
end

About

A very simple Ruby module for querying ANU LDAP

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages