You are here

public function sOAuthServer::fetch_access_token in jQuery social stream 7

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

process an access_token request returns the access token on success

File

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

Class

sOAuthServer

Code

public function fetch_access_token(&$request) {
  $this
    ->get_version($request);
  $consumer = $this
    ->get_consumer($request);

  // requires authorized request token
  $token = $this
    ->get_token($request, $consumer, "request");
  $this
    ->check_signature($request, $consumer, $token);

  // Rev A change
  $verifier = $request
    ->get_parameter('oauth_verifier');
  $new_token = $this->data_store
    ->new_access_token($token, $consumer, $verifier);
  return $new_token;
}