2 namespace PayPal\Auth\Oauth;
4 * The PLAINTEXT method does not provide any security protection and SHOULD only be used
5 * over a secure channel such as HTTPS. It does not use the Signature Base String.
6 * - Chapter 9.4 ("PLAINTEXT")
8 class OAuthSignatureMethodPLAINTEXT extends OAuthSignatureMethod {
9 public function get_name() {
14 * oauth_signature is set to the concatenated encoded values of the Consumer Secret and
15 * Token Secret, separated by a '&' character (ASCII code 38), even if either secret is
16 * empty. The result MUST be encoded again.
17 * - Chapter 9.4.1 ("Generating Signatures")
19 * Please note that the second encoding MUST NOT happen in the SignatureMethod, as
20 * OAuthRequest handles this!
22 public function build_signature($request, $consumer, $token) {
25 ($token) ? $token->secret : ""
28 $key_parts = OAuthUtil::urlencode_rfc3986($key_parts);
29 $key = implode('&', $key_parts);
30 $request->base_string = $key;