3 namespace Friendica\Security\OAuth1\Signature;
5 use Friendica\Security\OAuth1\OAuthRequest;
6 use Friendica\Security\OAuth1\OAuthUtil;
9 * The PLAINTEXT method does not provide any security protection and SHOULD only be used
10 * over a secure channel such as HTTPS. It does not use the Signature Base String.
11 * - Chapter 9.4 ("PLAINTEXT")
13 class OAuthSignatureMethod_PLAINTEXT extends OAuthSignatureMethod
15 public function get_name()
21 * oauth_signature is set to the concatenated encoded values of the Consumer Secret and
22 * Token Secret, separated by a '&' character (ASCII code 38), even if either secret is
23 * empty. The result MUST be encoded again.
24 * - Chapter 9.4.1 ("Generating Signatures")
26 * Please note that the second encoding MUST NOT happen in the SignatureMethod, as
27 * OAuthRequest handles this!
35 public function build_signature(OAuthRequest $request, \Friendica\Security\OAuth1\OAuthConsumer $consumer, \Friendica\Security\OAuth1\OAuthToken $token = null)
39 ($token) ? $token->secret : "",
42 $key_parts = OAuthUtil::urlencode_rfc3986($key_parts);
43 $key = implode('&', $key_parts);
44 $request->base_string = $key;