OCLC Developer Network

WSKey2 Client Libraries

WSKey V2 Java Client

A java client is provided to aid in building the HTTP header to be included in WSKey V2 requests and decoding the header included in responses.

The org.oclc.wskey.client.WSKeyV2Request class provides methods for generating the required header.

The org.oclc.wskey.client.WSKeyV2Response class provides methods for decode the response header.

Dependencies
WSKey V2 requires BASE64 encoding, which is not built in to java. The client uses commons codec to perform the base64 encoding.

Download the Java Client

WSKey V2 PHP Client

A PHP client is provided to aid in building the HTTP header to be included in WSKey V2 requests and retrieving the header included in error responses.
The functions provided are:

  • wskey_v2_request_header_name() - retrieves the name of the header to include in requests (value is Authorization).
  • wskey_v2_request_header_value($url, $method, $bodyHash, $wskey, $secret) - generates the value for the header to include in the request
    Parameters are:
    • $url - the WSKeyV2-protected URL you want to access
    • $method - the method you are using to access it ("GET" or "POST")
    • $bodyHash - the hash of the body of the request ( $bodyHash can just be set to an empty string if you don't want to use it; it is not required)
    • $wskey - your web service key 
    • $secret - your secret key
  • wskey_v2_response_header_name() - retrieves the name of the header to include in requests (value is WWW-Authenticate).

Download the PHP Client

Follow the OCLC Developer Network:

The OCLC Developer Network supports the use of OCLC Web Services—a set of tools and APIs that expose data and services for WorldCat and our member libraries and partner institutions or companies. learn more »

© 2010 OCLC Domestic and international trademarks and/or service marks of OCLC Online Computer Library Center, Inc. and its affiliates


Powered by Drupal, an open source content management system