You are here

private function OAuthServer::get_signature_method in OAuth 1.0 6

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

figure out the signature with some defaults

1 call to OAuthServer::get_signature_method()
OAuthServer::check_signature in ./OAuth.php
all-in-one function to check the signature on a request should guess the signature method appropriately

File

./OAuth.php, line 535

Class

OAuthServer

Code

private function get_signature_method(&$request) {

  /*{{{*/
  $signature_method = @$request
    ->get_parameter("oauth_signature_method");
  if (!$signature_method) {
    $signature_method = "PLAINTEXT";
  }
  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];
}