Authentication Libraries

Managing HMAC Signature and Token-based authentication on the client side is made easier by using our prebuilt client libraries, available from our OCLC Developer Network Github Repository.

Server Side

These libraries support authentication for both WorldCat and WorldShare APIs:

Language Repository Details
PHP OCLC PHP Auth Library

git clone https://github.com/OCLC-Developer-Network/oclc-auth-php.git
  • Generate an HMAC Signature.
  • OAuth2 Explicit User Authentication.
  • Includes an example of reading a Bibliographic Record from Worldcat Metadata
  • You must supply:
    • clientID
    • secret
    • InstitutionID
    • Principal ID & Principal IDNS (HMAC Signature only)
  • Convenient PHAR or .zip packaging
Ruby OCLC Auth Gem

git clone https://github.com/OCLC-Developer-Network/oclc-auth-ruby.git
  • Generate an HMAC Signature.
  • OAuth2 Explicit User Authentication using Sinatra as the HTTP Client
  • Includes an example of reading a Bibliographic Record from Worldcat Metadata
  • You must supply:
    • clientID
    • secret
    • InstitutionID
    • Principal ID & Principal IDNS (HMAC Signature only)
  • Convenient GEM packaging
Python OCLC Python Auth Library

git clone https://github.com/OCLC-Developer-Network/oclc-auth-python.git
  • Generate an HMAC Signature.
  • OAuth2 Explicit User Authentication.
  • Includes examples
    • HMAC Signature - reading a Bibliographic Record
    • OAuth2 Explicit User Authentication - reading a Bibliographic Record
      • Stand alone example
      • Django example
  • You must supply:
    • clientID
    • secret
    • InstitutionID
    • Principal ID & Principal IDNS (HMAC Signature only)
  • Simple install from the command line.

Mobile

These are mobile example apps that perform user agent flow access tokens for secure access to the WMS family of APIs.

  • Demonstrates Authentication and retrieves an Access Token
  • Utilizes a WebView to handle the http aspects of user authentication
  • Written in Android Java (for the Dalvik Virtual Machine)
Platform Repository Details
iOS OCLC Mobile Authentication iOS App Example

git clone https://github.com/OCLC-Developer-Network/oclc-auth-ios-example.git
  • Demonstrates Authentication and retrieves an Access Token
  • Utilizes a UIWebView to handle the http aspects of user authentication
  • Written in native Objective-C
Android OCLC Mobile Authentication Android App Example

git clone https://github.com/OCLC-Developer-Network/oclc-auth-android-example.git

We are a worldwide library cooperative, owned, governed and sustained by members since 1967. Our public purpose is a statement of commitment to each other—that we will work together to improve access to the information held in libraries around the globe, and find ways to reduce costs for libraries through collaboration. Learn more »