private function sOAuthServer::get_signature_method in jQuery social stream 7
Same name and namespace in other branches
- 7.2 jquery_social_stream.js.inc \sOAuthServer::get_signature_method()
figure out the signature with some defaults
1 call to sOAuthServer::get_signature_method()
- sOAuthServer::check_signature in ./
jquery_social_stream.js.inc - all-in-one function to check the signature on a request should guess the signature method appropriately
File
- ./
jquery_social_stream.js.inc, line 904 - JS callbacks.
Class
Code
private function get_signature_method(&$request) {
$signature_method = @$request
->get_parameter("oauth_signature_method");
if (!$signature_method) {
// According to chapter 7 ("Accessing Protected Ressources") the signature-method
// parameter is required, and we can't just fallback to PLAINTEXT
throw new sOAuthException('No signature method parameter. This parameter is required');
}
if (!in_array($signature_method, array_keys($this->signature_methods))) {
throw new sOAuthException("Signature method '{$signature_method}' not supported " . "try one of the following: " . implode(", ", array_keys($this->signature_methods)));
}
return $this->signature_methods[$signature_method];
}