Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/updraftp.../vendor/eher/oauth/src/Eher/OAuth
File: SignatureMethod.php
<?php
[0] Fix | Delete
[1] Fix | Delete
namespace Eher\OAuth;
[2] Fix | Delete
[3] Fix | Delete
/**
[4] Fix | Delete
* A class for implementing a Signature Method
[5] Fix | Delete
* See section 9 ("Signing Requests") in the spec
[6] Fix | Delete
*/
[7] Fix | Delete
abstract class SignatureMethod {
[8] Fix | Delete
/**
[9] Fix | Delete
* Needs to return the name of the Signature Method (ie HMAC-SHA1)
[10] Fix | Delete
* @return string
[11] Fix | Delete
*/
[12] Fix | Delete
abstract public function get_name();
[13] Fix | Delete
[14] Fix | Delete
/**
[15] Fix | Delete
* Build up the signature
[16] Fix | Delete
* NOTE: The output of this function MUST NOT be urlencoded.
[17] Fix | Delete
* the encoding is handled in Request when the final
[18] Fix | Delete
* request is serialized
[19] Fix | Delete
* @param Request $request
[20] Fix | Delete
* @param Consumer $consumer
[21] Fix | Delete
* @param OAuthToken $token
[22] Fix | Delete
* @return string
[23] Fix | Delete
*/
[24] Fix | Delete
abstract public function build_signature($request, $consumer, $token);
[25] Fix | Delete
[26] Fix | Delete
/**
[27] Fix | Delete
* Verifies that a given signature is correct
[28] Fix | Delete
* @param Request $request
[29] Fix | Delete
* @param Consumer $consumer
[30] Fix | Delete
* @param OAuthToken $token
[31] Fix | Delete
* @param string $signature
[32] Fix | Delete
* @return bool
[33] Fix | Delete
*/
[34] Fix | Delete
public function check_signature($request, $consumer, $token, $signature) {
[35] Fix | Delete
$built = $this->build_signature($request, $consumer, $token);
[36] Fix | Delete
return $built == $signature;
[37] Fix | Delete
}
[38] Fix | Delete
}
[39] Fix | Delete
[40] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function