Class to represent an OAuth Request. More...
Public Member Functions | |
| __construct ($http_method, $http_url, $parameters=null) | |
| set_parameter ($name, $value, $allow_duplicates=true) | |
| get_parameter ($name) | |
| get_parameters () | |
| unset_parameter ($name) | |
| get_signable_parameters () | |
| The request parameters, sorted and concatenated into a normalized string. More... | |
| get_signature_base_string () | |
| Returns the base string of this request. More... | |
| get_normalized_http_method () | |
| just uppercases the http method More... | |
| get_normalized_http_url () | |
| parses the url and rebuilds it to be scheme://host/path More... | |
| to_url () | |
| builds a url usable for a GET request More... | |
| to_postdata () | |
| builds the data one would send in a POST request More... | |
| to_header ($realm=null) | |
| builds the Authorization: header More... | |
| __toString () | |
| sign_request ($signature_method, $consumer, $token) | |
| build_signature ($signature_method, $consumer, $token) | |
Static Public Member Functions | |
| static | from_request ($http_method=null, $http_url=null, $parameters=null) |
| attempt to build up a request from what was passed to the server More... | |
| static | from_consumer_and_token ($consumer, $token, $http_method, $http_url, $parameters=null) |
| pretty much a helper function to set up the request More... | |
Data Fields | |
| $base_string | |
Static Public Attributes | |
| static | $version = '1.0' |
| static | $POST_INPUT = 'php://input' |
Protected Attributes | |
| $parameters | |
| $http_method | |
| $http_url | |
Class to represent an OAuth Request.
Definition at line 12 of file OAuthRequest.php.
| __construct | ( | $http_method, | |
| $http_url, | |||
$parameters = null |
|||
| ) |
Definition at line 22 of file OAuthRequest.php.
References OAuthRequest\$http_method, OAuthRequest\$http_url, OAuthRequest\$parameters, and OAuthUtil\parse_parameters().
| __toString | ( | ) |
Definition at line 251 of file OAuthRequest.php.
References OAuthRequest\to_url().
| build_signature | ( | $signature_method, | |
| $consumer, | |||
| $token | |||
| ) |
Definition at line 268 of file OAuthRequest.php.
Referenced by OAuthRequest\sign_request().
|
static |
pretty much a helper function to set up the request
Definition at line 87 of file OAuthRequest.php.
References OAuthRequest\$http_method, OAuthRequest\$http_url, OAuthRequest\$parameters, and OAuthRequest\$version.
Referenced by ToolConsumer\addSignature(), ResourceLink\fromRecordId(), and ToolConsumer\signParameters().
|
static |
attempt to build up a request from what was passed to the server
Definition at line 36 of file OAuthRequest.php.
References OAuthRequest\$http_method, OAuthRequest\$http_url, OAuthRequest\$parameters, OAuthUtil\get_headers(), OAuthUtil\parse_parameters(), and OAuthUtil\split_header().
Referenced by ToolProvider\onError().
| get_normalized_http_method | ( | ) |
just uppercases the http method
Definition at line 173 of file OAuthRequest.php.
Referenced by OAuthRequest\get_signature_base_string().
| get_normalized_http_url | ( | ) |
parses the url and rebuilds it to be scheme://host/path
Definition at line 181 of file OAuthRequest.php.
Referenced by OAuthRequest\get_signature_base_string(), and OAuthRequest\to_url().
| get_parameter | ( | $name | ) |
Definition at line 119 of file OAuthRequest.php.
Referenced by OAuthServer\verify_request().
| get_parameters | ( | ) |
Definition at line 123 of file OAuthRequest.php.
References OAuthRequest\$parameters.
| get_signable_parameters | ( | ) |
The request parameters, sorted and concatenated into a normalized string.
Definition at line 135 of file OAuthRequest.php.
References OAuthRequest\$parameters, and OAuthUtil\build_http_query().
Referenced by OAuthRequest\get_signature_base_string().
| get_signature_base_string | ( | ) |
Returns the base string of this request.
The base string defined as the method, the url and the parameters (normalized), each urlencoded and the concated with &.
Definition at line 157 of file OAuthRequest.php.
References OAuthRequest\get_normalized_http_method(), OAuthRequest\get_normalized_http_url(), OAuthRequest\get_signable_parameters(), and OAuthUtil\urlencode_rfc3986().
| set_parameter | ( | $name, | |
| $value, | |||
$allow_duplicates = true |
|||
| ) |
Definition at line 103 of file OAuthRequest.php.
Referenced by OAuthRequest\sign_request().
| sign_request | ( | $signature_method, | |
| $consumer, | |||
| $token | |||
| ) |
Definition at line 256 of file OAuthRequest.php.
References OAuthRequest\build_signature(), and OAuthRequest\set_parameter().
| to_header | ( | $realm = null | ) |
builds the Authorization: header
Definition at line 224 of file OAuthRequest.php.
References OAuthUtil\urlencode_rfc3986().
| to_postdata | ( | ) |
builds the data one would send in a POST request
Definition at line 217 of file OAuthRequest.php.
References OAuthUtil\build_http_query().
Referenced by OAuthRequest\to_url().
| to_url | ( | ) |
builds a url usable for a GET request
Definition at line 202 of file OAuthRequest.php.
References OAuthRequest\get_normalized_http_url(), and OAuthRequest\to_postdata().
Referenced by OAuthRequest\__toString().
| unset_parameter | ( | $name | ) |
Definition at line 127 of file OAuthRequest.php.
| $base_string |
Definition at line 18 of file OAuthRequest.php.
|
protected |
Definition at line 15 of file OAuthRequest.php.
Referenced by OAuthRequest\__construct(), OAuthRequest\from_consumer_and_token(), and OAuthRequest\from_request().
|
protected |
Definition at line 16 of file OAuthRequest.php.
Referenced by OAuthRequest\__construct(), OAuthRequest\from_consumer_and_token(), and OAuthRequest\from_request().
|
protected |
Definition at line 14 of file OAuthRequest.php.
Referenced by OAuthRequest\__construct(), OAuthRequest\from_consumer_and_token(), OAuthRequest\from_request(), OAuthRequest\get_parameters(), and OAuthRequest\get_signable_parameters().
|
static |
Definition at line 20 of file OAuthRequest.php.
|
static |
Definition at line 19 of file OAuthRequest.php.
Referenced by OAuthRequest\from_consumer_and_token().