You are here

private function OAuthServer::get_version in jQuery social stream 8

Same name and namespace in other branches
  1. 8.2 src/Twitter/OAuthServer.php \Drupal\jquery_social_stream\Twitter\OAuthServer::get_version()

version 1

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

File

src/Twitter/OAuthServer.php, line 80

Class

OAuthServer

Namespace

Drupal\jquery_social_stream\Twitter

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 OAuthException("OAuth version '{$version}' not supported");
  }
  return $version;
}