Rename OAuthRequest to Request

This commit is contained in:
Eher 2012-12-02 18:21:23 -02:00
parent 663f81f35b
commit e3aea01134
3 changed files with 9 additions and 9 deletions

View File

@ -94,7 +94,7 @@ class OAuthServer {
* figure out the signature with some defaults * figure out the signature with some defaults
*/ */
private function get_signature_method($request) { private function get_signature_method($request) {
$signature_method = $request instanceof OAuthRequest $signature_method = $request instanceof Request
? $request->get_parameter("oauth_signature_method") ? $request->get_parameter("oauth_signature_method")
: NULL; : NULL;
@ -119,7 +119,7 @@ class OAuthServer {
* try to find the consumer for the provided request's consumer key * try to find the consumer for the provided request's consumer key
*/ */
private function get_consumer($request) { private function get_consumer($request) {
$consumer_key = $request instanceof OAuthRequest $consumer_key = $request instanceof Request
? $request->get_parameter("oauth_consumer_key") ? $request->get_parameter("oauth_consumer_key")
: NULL; : NULL;
@ -139,7 +139,7 @@ class OAuthServer {
* try to find the token for the provided request's token key * try to find the token for the provided request's token key
*/ */
private function get_token($request, $consumer, $token_type="access") { private function get_token($request, $consumer, $token_type="access") {
$token_field = $request instanceof OAuthRequest $token_field = $request instanceof Request
? $request->get_parameter('oauth_token') ? $request->get_parameter('oauth_token')
: NULL; : NULL;
@ -158,10 +158,10 @@ class OAuthServer {
*/ */
private function check_signature($request, $consumer, $token) { private function check_signature($request, $consumer, $token) {
// this should probably be in a different method // this should probably be in a different method
$timestamp = $request instanceof OAuthRequest $timestamp = $request instanceof Request
? $request->get_parameter('oauth_timestamp') ? $request->get_parameter('oauth_timestamp')
: NULL; : NULL;
$nonce = $request instanceof OAuthRequest $nonce = $request instanceof Request
? $request->get_parameter('oauth_nonce') ? $request->get_parameter('oauth_nonce')
: NULL; : NULL;

View File

@ -19,7 +19,7 @@ class PlainText extends SignatureMethod {
* - Chapter 9.4.1 ("Generating Signatures") * - Chapter 9.4.1 ("Generating Signatures")
* *
* Please note that the second encoding MUST NOT happen in the SignatureMethod, as * Please note that the second encoding MUST NOT happen in the SignatureMethod, as
* OAuthRequest handles this! * Request handles this!
*/ */
public function build_signature($request, $consumer, $token) { public function build_signature($request, $consumer, $token) {
$key_parts = array( $key_parts = array(

View File

@ -16,9 +16,9 @@ abstract class SignatureMethod {
/** /**
* Build up the signature * Build up the signature
* NOTE: The output of this function MUST NOT be urlencoded. * NOTE: The output of this function MUST NOT be urlencoded.
* the encoding is handled in OAuthRequest when the final * the encoding is handled in Request when the final
* request is serialized * request is serialized
* @param OAuthRequest $request * @param Request $request
* @param OAuthConsumer $consumer * @param OAuthConsumer $consumer
* @param OAuthToken $token * @param OAuthToken $token
* @return string * @return string
@ -27,7 +27,7 @@ abstract class SignatureMethod {
/** /**
* Verifies that a given signature is correct * Verifies that a given signature is correct
* @param OAuthRequest $request * @param Request $request
* @param OAuthConsumer $consumer * @param OAuthConsumer $consumer
* @param OAuthToken $token * @param OAuthToken $token
* @param string $signature * @param string $signature