You are here

private function OAuthServer::get_consumer in OAuth 1.0 6

Same name and namespace in other branches
  1. 6.3 lib/OAuth.php \OAuthServer::get_consumer()
  2. 7.3 lib/OAuth.php \OAuthServer::get_consumer()

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

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

File

./OAuth.php, line 553

Class

OAuthServer

Code

private function get_consumer(&$request) {

  /*{{{*/
  $consumer_key = @$request
    ->get_parameter("oauth_consumer_key");
  if (!$consumer_key) {
    throw new OAuthException("Invalid consumer key");
  }
  $consumer = $this->data_store
    ->lookup_consumer($consumer_key);
  if (!$consumer) {
    throw new OAuthException("Invalid consumer");
  }
  return $consumer;
}