You are here

private function OAuthServer::get_token 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_token()

try to find the token for the provided request's token key

2 calls to OAuthServer::get_token()
OAuthServer::fetch_access_token in src/Twitter/OAuthServer.php
process an access_token request returns the access 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 138

Class

OAuthServer

Namespace

Drupal\jquery_social_stream\Twitter

Code

private function get_token(&$request, $consumer, $token_type = "access") {
  $token_field = @$request
    ->get_parameter('oauth_token');
  $token = $this->data_store
    ->lookup_token($consumer, $token_type, $token_field);
  if (!$token) {
    throw new OAuthException("Invalid {$token_type} token: {$token_field}");
  }
  return $token;
}