lib/oclc/auth/wskey.rb
# Retuns an OCLC::Auth::AccessToken object when given an authorization code
#
# [scope] a space separated list of the OCLC web services the client is requesting access to
# [authenticating_institution_id] the WorldCat Registry ID of the institution that will login the user
# [context_institution_id] the WorldCat Registry ID of the institution whose data will be accessed
# [options] a hash of optional parameters described below
#
# Options
# 
# [:principal_id] the ID that represents a user
# [:principal_idns] the ID namespace context for the user
Retuns an OCLC::Auth::AccessToken object when given an authorization code
[scope] a space separated list of the OCLC web services the client is requesting access to
[authenticating_institution_id] the WorldCat Registry ID of the institution that will login the user
[context_institution_id] the WorldCat Registry ID of the institution whose data will be accessed
[options] a hash of optional parameters described below

Options

[:principal_id] the ID that represents a user
[:principal_idns] the ID namespace context for the user
Retuns an OCLC :: Auth :: AccessToken object when given an authorization code [ scope ] a space separated list of the OCLC web services the client is requesting access to [ authenticating_institution_id ] the WorldCat Registry ID of the institution that will login the user [ context_institution_id ] the WorldCat Registry ID of the institution whose data will be accessed [ options ] a hash of optional parameters described below Options [ : principal_id ] the ID that represents a user [ : principal_idns ] the ID namespace context for the user
def client_credentials_token(authenticating_institution_id, context_institution_id, options = {})
        if services == nil or services.size == 0
          raise OCLC::Auth::Exception, "No service specified. You must construct a WSKey with one or more services to request an access token code" 
        end
        token = OCLC::Auth::AccessToken.new('client_credentials', services.join(' '), authenticating_institution_id, context_institution_id)
        if @auth_server_url
          token.auth_server_url = @auth_server_url + '/accessToken'
        end
        token.create!(self, options)
        token
      end
def client_credentials_token ( authenticating_institution_id , context_institution_id , options = { } ) if services == nil or services . size == 0 raise OCLC :: Auth :: Exception , "No service specified. You must construct a WSKey with one or more services to request an access token code" end token = OCLC :: Auth :: AccessToken . new ( 'client_credentials' , services . join ( ' ' ) , authenticating_institution_id , context_institution_id ) if @auth_server_url token . auth_server_url = @auth_server_url + '/accessToken' end token . create! ( self , options ) token end
Retuns an OCLC::Auth::AccessToken object when given an authorization code
[scope] a space separated list of the OCLC web services the client is requesting access to
[authenticating_institution_id] the WorldCat Registry ID of the institution that will login the user
[context_institution_id] the WorldCat Registry ID of the institution whose data will be accessed
[options] a hash of optional parameters described below
Retuns an OCLC :: Auth :: AccessToken object when given an authorization code [ scope ] a space separated list of the OCLC web services the client is requesting access to [ authenticating_institution_id ] the WorldCat Registry ID of the institution that will login the user [ context_institution_id ] the WorldCat Registry ID of the institution whose data will be accessed [ options ] a hash of optional parameters described below
authenticating_institution_id
<not_specific>
context_institution_id
<not_specific>
options
<not_specific>