Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
moodle\mod\lti\OAuthRequest Class Reference

Public Member Functions

 __construct ($http_method, $http_url, $parameters=null)
 
 __toString ()
 
 build_signature ($signature_method, $consumer, $token)
 
 get_normalized_http_method ()
 just uppercases the http method
 
 get_normalized_http_url ()
 Parses {.
 
 get_parameter ($name)
 
 get_parameters ()
 
 get_signable_parameters ()
 The request parameters, sorted and concatenated into a normalized string.
 
 get_signature_base_string ()
 Returns the base string of this request.
 
 set_parameter ($name, $value, $allow_duplicates=true)
 
 sign_request ($signature_method, $consumer, $token)
 
 to_header ()
 builds the Authorization: header
 
 to_postdata ()
 builds the data one would send in a POST request
 
 to_url ()
 builds a url usable for a GET request
 
 unset_parameter ($name)
 

Static Public Member Functions

static from_consumer_and_token ($consumer, $token, $http_method, $http_url, $parameters=null)
 pretty much a helper function to set up the request
 
static from_request ($http_method=null, $http_url=null, $parameters=null)
 attempt to build up a request from what was passed to the server
 

Public Attributes

 $base_string
 

Static Public Attributes

static $POST_INPUT = 'php://input'
 
static $version = '1.0'
 

Member Function Documentation

◆ get_normalized_http_url()

moodle\mod\lti\OAuthRequest::get_normalized_http_url ( )

Parses {.

See also
http_url} and returns normalized scheme://host/path if non-empty, otherwise return empty string
Return values
string

◆ get_signable_parameters()

moodle\mod\lti\OAuthRequest::get_signable_parameters ( )

The request parameters, sorted and concatenated into a normalized string.

Return values
string

◆ get_signature_base_string()

moodle\mod\lti\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 &.


The documentation for this class was generated from the following file: