You are here

public function OAuthSignatureMethod_PLAINTEXT::build_signature in OAuth 1.0 6

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

File

./OAuth.php, line 82

Class

OAuthSignatureMethod_PLAINTEXT

Code

public function build_signature($request, $consumer, $token) {

  /*{{{*/
  $sig = array(
    OAuthUtil::urlencodeRFC3986($consumer->secret),
  );
  if ($token) {
    array_push($sig, OAuthUtil::urlencodeRFC3986($token->secret));
  }
  else {
    array_push($sig, '');
  }
  $raw = implode("&", $sig);

  // for debug purposes
  $request->base_string = $raw;
  return OAuthUtil::urlencodeRFC3986($raw);
}