You are here

class OAuthSignatureMethod_PLAINTEXT in OAuth 1.0 6

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

Hierarchy

Expanded class hierarchy of OAuthSignatureMethod_PLAINTEXT

File

./OAuth.php, line 77

View source
class OAuthSignatureMethod_PLAINTEXT extends OAuthSignatureMethod {

  /*{{{*/
  public function get_name() {

    /*{{{*/
    return "PLAINTEXT";
  }

  /*}}}*/
  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);
  }

}

Members