private function OAuthServer::get_consumer in jQuery social stream 8
Same name and namespace in other branches
- 8.2 src/Twitter/OAuthServer.php \Drupal\jquery_social_stream\Twitter\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 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 121
Class
Namespace
Drupal\jquery_social_stream\TwitterCode
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;
}