Class to provide OAuth utility methods. More...
Static Public Member Functions | |
| static | urlencode_rfc3986 ($input) |
| URL encode. | |
| static | urldecode_rfc3986 ($string) |
| URL decode. | |
| static | split_header ($header, $only_allow_oauth_parameters=true) |
| Utility function for turning the Authorization: header into parameters, has to do some unescaping. | |
| static | get_headers () |
| Helper to try to sort out headers for people who aren't running apache. | |
| static | parse_parameters ($input) |
| Parse parameters. | |
| static | build_http_query ($params) |
| Build HTTP query string. | |
Class to provide OAuth utility methods.
Definition at line 12 of file OAuthUtil.php.
|
static |
Build HTTP query string.
| array | null | $params | Array of parameters |
Definition at line 171 of file OAuthUtil.php.
References OAuthUtil\urlencode_rfc3986().
Referenced by OAuthRequest\get_signable_parameters(), and OAuthRequest\to_postdata().
|
static |
Helper to try to sort out headers for people who aren't running apache.
Definition at line 83 of file OAuthUtil.php.
Referenced by OAuthRequest\from_request().
|
static |
Parse parameters.
This function takes a input like a=b&a=c&d=e and returns the parsed parameters like this ['a' => ['b','c'], 'd' => 'e']
| string | null | $input | Parameter string to be parsed |
Definition at line 132 of file OAuthUtil.php.
References OAuthUtil\urldecode_rfc3986().
Referenced by OAuthRequest\__construct(), and OAuthRequest\from_request().
|
static |
Utility function for turning the Authorization: header into parameters, has to do some unescaping.
Can filter out any non-oauth parameters if needed (default behaviour) May 28th, 2010 - method updated to tjerk.meesters for a speed improvement. see http://code.google.com/p/oauth/issues/detail?id=163
| string | $header | Header value |
| bool | $only_allow_oauth_parameters | True if only OAuth parameters are allowed |
Definition at line 62 of file OAuthUtil.php.
References OAuthUtil\urldecode_rfc3986().
Referenced by OAuthRequest\from_request().
|
static |
URL decode.
This decode function isn't taking into consideration the above modifications to the encoding process. However, this method doesn't seem to be used anywhere so leaving it as is.
| string | $string | String to be decoded |
Definition at line 44 of file OAuthUtil.php.
Referenced by OAuthUtil\parse_parameters(), and OAuthUtil\split_header().
|
static |
URL encode.
| mixed | $input | Value to be encoded |
Definition at line 22 of file OAuthUtil.php.
Referenced by OAuthUtil\build_http_query(), OAuthSignatureMethod_HMAC_SHA1\build_signature(), OAuthSignatureMethod_HMAC_SHA224\build_signature(), OAuthSignatureMethod_HMAC_SHA256\build_signature(), OAuthSignatureMethod_HMAC_SHA384\build_signature(), OAuthSignatureMethod_HMAC_SHA512\build_signature(), OAuthRequest\get_signature_base_string(), OAuthRequest\to_header(), and OAuthToken\to_string().