private function OAuthServer::get_signature_method in jQuery social stream 8.2
Same name and namespace in other branches
- 8 src/Twitter/OAuthServer.php \Drupal\jquery_social_stream\Twitter\OAuthServer::get_signature_method()
figure out the signature with some defaults
1 call to OAuthServer::get_signature_method()
- OAuthServer::check_signature in src/
Twitter/ OAuthServer.php - all-in-one function to check the signature on a request should guess the signature method appropriately
File
- src/
Twitter/ OAuthServer.php, line 96
Class
Namespace
Drupal\jquery_social_stream\TwitterCode
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 OAuthException('No signature method parameter. This parameter is required');
}
if (!in_array($signature_method, array_keys($this->signature_methods))) {
throw new OAuthException("Signature method '{$signature_method}' not supported " . "try one of the following: " . implode(", ", array_keys($this->signature_methods)));
}
return $this->signature_methods[$signature_method];
}