You are here

private function sOAuthServer::get_version in jQuery social stream 7.2

Same name and namespace in other branches
  1. 7 jquery_social_stream.js.inc \sOAuthServer::get_version()

version 1

3 calls to sOAuthServer::get_version()
sOAuthServer::fetch_access_token in ./jquery_social_stream.js.inc
process an access_token request returns the access token on success
sOAuthServer::fetch_request_token in ./jquery_social_stream.js.inc
process a request_token request returns the request token on success
sOAuthServer::verify_request in ./jquery_social_stream.js.inc
verify an api call, checks all the parameters

File

./jquery_social_stream.js.inc, line 1020
JS callbacks.

Class

sOAuthServer

Code

private function get_version(&$request) {
  $version = $request
    ->get_parameter("oauth_version");
  if (!$version) {

    // Service Providers MUST assume the protocol version to be 1.0 if this parameter is not present.
    // Chapter 7.0 ("Accessing Protected Ressources")
    $version = '1.0';
  }
  if ($version !== $this->version) {
    throw new sOAuthException("sOAuth version '{$version}' not supported");
  }
  return $version;
}