ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
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 | |
Static Private Member Functions | |
static | generate_timestamp () |
util function: current timestamp More... | |
static | generate_nonce () |
util function: current nonce More... | |
Class to represent an OAuth Request.
Definition at line 12 of file OAuthRequest.php.
IMSGlobal\LTI\OAuth\OAuthRequest::__construct | ( | $http_method, | |
$http_url, | |||
$parameters = null |
|||
) |
Definition at line 22 of file OAuthRequest.php.
References IMSGlobal\LTI\OAuth\OAuthRequest\$http_method, IMSGlobal\LTI\OAuth\OAuthRequest\$http_url, IMSGlobal\LTI\OAuth\OAuthRequest\$parameters, and IMSGlobal\LTI\OAuth\OAuthUtil\parse_parameters().
IMSGlobal\LTI\OAuth\OAuthRequest::__toString | ( | ) |
Definition at line 251 of file OAuthRequest.php.
References IMSGlobal\LTI\OAuth\OAuthRequest\to_url().
IMSGlobal\LTI\OAuth\OAuthRequest::build_signature | ( | $signature_method, | |
$consumer, | |||
$token | |||
) |
Definition at line 268 of file OAuthRequest.php.
References PHPMailer\PHPMailer\$token.
Referenced by IMSGlobal\LTI\OAuth\OAuthRequest\sign_request().
|
static |
pretty much a helper function to set up the request
Definition at line 87 of file OAuthRequest.php.
References IMSGlobal\LTI\OAuth\OAuthRequest\$http_method, IMSGlobal\LTI\OAuth\OAuthRequest\$http_url, IMSGlobal\LTI\OAuth\OAuthRequest\$parameters, PHPMailer\PHPMailer\$token, IMSGlobal\LTI\OAuth\OAuthRequest\$version, IMSGlobal\LTI\OAuth\OAuthRequest\generate_nonce(), and IMSGlobal\LTI\OAuth\OAuthRequest\generate_timestamp().
Referenced by IMSGlobal\LTI\ToolProvider\ToolConsumer\addSignature(), IMSGlobal\LTI\ToolProvider\ResourceLink\doLTI11Service(), and IMSGlobal\LTI\ToolProvider\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 $_SERVER, IMSGlobal\LTI\OAuth\OAuthRequest\$http_method, IMSGlobal\LTI\OAuth\OAuthRequest\$http_url, IMSGlobal\LTI\OAuth\OAuthRequest\$parameters, IMSGlobal\LTI\OAuth\OAuthUtil\get_headers(), IMSGlobal\LTI\OAuth\OAuthUtil\parse_parameters(), and IMSGlobal\LTI\OAuth\OAuthUtil\split_header().
Referenced by IMSGlobal\LTI\ToolProvider\ToolProvider\authenticate().
|
staticprivate |
util function: current nonce
Definition at line 283 of file OAuthRequest.php.
Referenced by IMSGlobal\LTI\OAuth\OAuthRequest\from_consumer_and_token().
|
staticprivate |
util function: current timestamp
Definition at line 276 of file OAuthRequest.php.
Referenced by IMSGlobal\LTI\OAuth\OAuthRequest\from_consumer_and_token().
IMSGlobal\LTI\OAuth\OAuthRequest::get_normalized_http_method | ( | ) |
just uppercases the http method
Definition at line 173 of file OAuthRequest.php.
Referenced by IMSGlobal\LTI\OAuth\OAuthRequest\get_signature_base_string().
IMSGlobal\LTI\OAuth\OAuthRequest::get_normalized_http_url | ( | ) |
parses the url and rebuilds it to be scheme://host/path
Definition at line 181 of file OAuthRequest.php.
References $path.
Referenced by IMSGlobal\LTI\OAuth\OAuthRequest\get_signature_base_string(), and IMSGlobal\LTI\OAuth\OAuthRequest\to_url().
IMSGlobal\LTI\OAuth\OAuthRequest::get_parameter | ( | $name | ) |
IMSGlobal\LTI\OAuth\OAuthRequest::get_parameters | ( | ) |
Definition at line 123 of file OAuthRequest.php.
References IMSGlobal\LTI\OAuth\OAuthRequest\$parameters.
IMSGlobal\LTI\OAuth\OAuthRequest::get_signable_parameters | ( | ) |
The request parameters, sorted and concatenated into a normalized string.
Definition at line 135 of file OAuthRequest.php.
References IMSGlobal\LTI\OAuth\OAuthRequest\$parameters, PHPMailer\PHPMailer\$params, and IMSGlobal\LTI\OAuth\OAuthUtil\build_http_query().
Referenced by IMSGlobal\LTI\OAuth\OAuthRequest\get_signature_base_string().
IMSGlobal\LTI\OAuth\OAuthRequest::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 IMSGlobal\LTI\OAuth\OAuthRequest\get_normalized_http_method(), IMSGlobal\LTI\OAuth\OAuthRequest\get_normalized_http_url(), IMSGlobal\LTI\OAuth\OAuthRequest\get_signable_parameters(), and IMSGlobal\LTI\OAuth\OAuthUtil\urlencode_rfc3986().
IMSGlobal\LTI\OAuth\OAuthRequest::set_parameter | ( | $name, | |
$value, | |||
$allow_duplicates = true |
|||
) |
Definition at line 103 of file OAuthRequest.php.
References $name.
Referenced by IMSGlobal\LTI\OAuth\OAuthRequest\sign_request().
IMSGlobal\LTI\OAuth\OAuthRequest::sign_request | ( | $signature_method, | |
$consumer, | |||
$token | |||
) |
Definition at line 256 of file OAuthRequest.php.
References PHPMailer\PHPMailer\$token, IMSGlobal\LTI\OAuth\OAuthRequest\build_signature(), and IMSGlobal\LTI\OAuth\OAuthRequest\set_parameter().
IMSGlobal\LTI\OAuth\OAuthRequest::to_header | ( | $realm = null | ) |
builds the Authorization: header
Definition at line 224 of file OAuthRequest.php.
References $out, $total, and IMSGlobal\LTI\OAuth\OAuthUtil\urlencode_rfc3986().
IMSGlobal\LTI\OAuth\OAuthRequest::to_postdata | ( | ) |
builds the data one would send in a POST request
Definition at line 217 of file OAuthRequest.php.
References IMSGlobal\LTI\OAuth\OAuthUtil\build_http_query().
Referenced by IMSGlobal\LTI\OAuth\OAuthRequest\to_url().
IMSGlobal\LTI\OAuth\OAuthRequest::to_url | ( | ) |
builds a url usable for a GET request
Definition at line 202 of file OAuthRequest.php.
References $out, IMSGlobal\LTI\OAuth\OAuthRequest\get_normalized_http_url(), and IMSGlobal\LTI\OAuth\OAuthRequest\to_postdata().
Referenced by IMSGlobal\LTI\OAuth\OAuthRequest\__toString().
IMSGlobal\LTI\OAuth\OAuthRequest::unset_parameter | ( | $name | ) |
Definition at line 127 of file OAuthRequest.php.
References $name.
IMSGlobal\LTI\OAuth\OAuthRequest::$base_string |
Definition at line 18 of file OAuthRequest.php.
|
protected |
Definition at line 15 of file OAuthRequest.php.
Referenced by IMSGlobal\LTI\OAuth\OAuthRequest\__construct(), IMSGlobal\LTI\OAuth\OAuthRequest\from_consumer_and_token(), and IMSGlobal\LTI\OAuth\OAuthRequest\from_request().
|
protected |
Definition at line 16 of file OAuthRequest.php.
Referenced by IMSGlobal\LTI\OAuth\OAuthRequest\__construct(), IMSGlobal\LTI\OAuth\OAuthRequest\from_consumer_and_token(), and IMSGlobal\LTI\OAuth\OAuthRequest\from_request().
|
protected |
Definition at line 14 of file OAuthRequest.php.
Referenced by IMSGlobal\LTI\OAuth\OAuthRequest\__construct(), IMSGlobal\LTI\OAuth\OAuthRequest\from_consumer_and_token(), IMSGlobal\LTI\OAuth\OAuthRequest\from_request(), IMSGlobal\LTI\OAuth\OAuthRequest\get_parameters(), and IMSGlobal\LTI\OAuth\OAuthRequest\get_signable_parameters().
|
static |
Definition at line 20 of file OAuthRequest.php.
|
static |
Definition at line 19 of file OAuthRequest.php.
Referenced by IMSGlobal\LTI\OAuth\OAuthRequest\from_consumer_and_token().