private function sOAuthServer::get_consumer in jQuery social stream 7
Same name and namespace in other branches
- 7.2 jquery_social_stream.js.inc \sOAuthServer::get_consumer()
try to find the consumer for the provided request's consumer key
3 calls to sOAuthServer::get_consumer()
- sOAuthServer::fetch_access_token in ./
jquery_social_stream.js.inc - process an access_token request returns the access token on success
- sOAuthServer::fetch_request_token in ./
jquery_social_stream.js.inc - process a request_token request returns the request token on success
- sOAuthServer::verify_request in ./
jquery_social_stream.js.inc - verify an api call, checks all the parameters
File
- ./
jquery_social_stream.js.inc, line 929 - JS callbacks.
Class
Code
private function get_consumer(&$request) {
$consumer_key = @$request
->get_parameter("oauth_consumer_key");
if (!$consumer_key) {
throw new sOAuthException("Invalid consumer key");
}
$consumer = $this->data_store
->lookup_consumer($consumer_key);
if (!$consumer) {
throw new sOAuthException("Invalid consumer");
}
return $consumer;
}