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

ldap_disambiguate

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ldap_disambiguate

  • 0.0.5
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

ldap_disambiguate

Use ldap to disambiguate a user name against the PSU LDAP.

Useage

Instantiate the servercive with a string LdapDisambiguate::Name.new("jbd123") Call the disambiguate method which returns an array of people in the format [{:id=>"jbd123", :given_name=>"Jane B", :surname=>"Doe", :email=>"jbd123@psu.edu", :affiliation=>["STAFF"]}]

What you pass in as the nam can vary from an id to a list of names and or emails.

Basic usage with a id

You can call dismabiguate with an id, which then call ldap and returns a record containing the

service = LdapDisambiguate::Name.new("cam156") # #<LdapDisambiguate::Name:0x007fab36190710 @name="cam156", @email_for_name_cache={}, @results=[]>
service.disambiguate #[{:id=>"cam156", :given_name=>"CAROLYN A", :surname=>"COLE", :email=>"cam156@psu.edu", :affiliation=>["STAFF"]}]

Basic usage with a name

service = LdapDisambiguate::Name.new("Carolyn Cole") # #<LdapDisambiguate::Name:0x007fab36190710 @name="Carolyn Cole", @email_for_name_cache={}, @results=[]>
service.disambiguate #[{:id=>"cam156", :given_name=>"CAROLYN A", :surname=>"COLE", :email=>"cam156@psu.edu", :affiliation=>["STAFF"]}]

Useage with last name and first name part

service = LdapDisambiguate::Name.new("Carol Cole") # #<LdapDisambiguate::Name:0x007fab36190710 @name="Carol Cole", @email_for_name_cache={}, @results=[]>
service.disambiguate #[{:id=>"cam156", :given_name=>"CAROLYN A", :surname=>"COLE", :email=>"cam156@psu.edu", :affiliation=>["STAFF"]}]

Useage with last name and first name part

service = LdapDisambiguate::Name.new("Carol Cole, cam156") # #<LdapDisambiguate::Name:0x007fab36190710 @name="Carol Cole", @email_for_name_cache={}, @results=[]>
service.disambiguate #[{:id=>"cam156", :given_name=>"CAROLYN A", :surname=>"COLE", :email=>"cam156@psu.edu", :affiliation=>["STAFF"]}]

Useage with a list of names

service = LdapDisambiguate::Name.new("Carol Cole; Adam Wead") ##<LdapDisambiguate::Name:0x007fab32cf2418 @name="Carol Cole; Adam Wead", @email_for_name_cache={}, @results=[]>
service.disambiguate #[{:id=>"cam156", :given_name=>"CAROLYN A", :surname=>"COLE", :email=>"cam156@psu.edu", :affiliation=>["STAFF"]}, {:id=>"agw13", :given_name=>"ADAM GARNER", :surname=>"WEAD", :email=>"agw13@psu.edu", :affiliation=>["STAFF"]}]

FAQs

Package last updated on 08 Jan 2018

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