An OAuth request.
More...
|
static | fromRequest ( $method=null, $url=null, ?array $params=null) |
| Attempt to build up a request from what was passed to the server.
|
|
static | fromConsumerAndToken (Consumer $consumer, ?Token $token, $method, $url, ?array $parameters=null) |
|
|
static | $version = '1.0' |
|
static | $POST_INPUT = 'php://input' |
|
◆ __construct()
MediaWiki\OAuthClient\Request::__construct |
( |
| $method, |
|
|
| $url, |
|
|
| $parameters = null ) |
- Parameters
-
string | $method | |
string | $url | |
array | null | $parameters | |
◆ buildSignature()
- Parameters
-
SignatureMethod | $signature_method | |
Consumer | $consumer | |
Token | null | $token | |
- Returns
- mixed
◆ fromConsumerAndToken()
static MediaWiki\OAuthClient\Request::fromConsumerAndToken |
( |
Consumer | $consumer, |
|
|
?Token | $token, |
|
|
| $method, |
|
|
| $url, |
|
|
?array | $parameters = null ) |
|
static |
- Parameters
-
Consumer | $consumer | |
Token | null | $token | |
string | $method | |
string | $url | |
array | null | $parameters | |
- Returns
- Request
◆ fromRequest()
static MediaWiki\OAuthClient\Request::fromRequest |
( |
| $method = null, |
|
|
| $url = null, |
|
|
?array | $params = null ) |
|
static |
Attempt to build up a request from what was passed to the server.
- Parameters
-
string | null | $method | |
string | null | $url | |
array | null | $params | |
- Returns
- Request
◆ getNormalizedMethod()
MediaWiki\OAuthClient\Request::getNormalizedMethod |
( |
| ) |
|
◆ getNormalizedUrl()
MediaWiki\OAuthClient\Request::getNormalizedUrl |
( |
| ) |
|
Parses the url and rebuilds it to be scheme://host/path.
- Returns
- string
◆ getParameter()
MediaWiki\OAuthClient\Request::getParameter |
( |
| $name | ) |
|
◆ getParameters()
MediaWiki\OAuthClient\Request::getParameters |
( |
| ) |
|
◆ getSignableParameters()
MediaWiki\OAuthClient\Request::getSignableParameters |
( |
| ) |
|
The request parameters, sorted and concatenated into a normalized string.
- Returns
- string
◆ getSignatureBaseString()
MediaWiki\OAuthClient\Request::getSignatureBaseString |
( |
| ) |
|
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 &.
- Returns
- string
◆ setParameter()
MediaWiki\OAuthClient\Request::setParameter |
( |
| $name, |
|
|
| $value, |
|
|
| $allow_duplicates = true ) |
- Parameters
-
string | $name | |
string | $value | |
bool | $allow_duplicates | |
◆ signRequest()
- Parameters
-
SignatureMethod | $signature_method | |
Consumer | $consumer | |
Token | null | $token | |
◆ toHeader()
MediaWiki\OAuthClient\Request::toHeader |
( |
| $realm = null | ) |
|
Builds the Authorization: header.
- Parameters
-
- Returns
- string
◆ toPostData()
MediaWiki\OAuthClient\Request::toPostData |
( |
| ) |
|
Builds the data one would send in a POST request.
- Returns
- string
◆ toUrl()
MediaWiki\OAuthClient\Request::toUrl |
( |
| ) |
|
Builds a url usable for a GET request.
- Returns
- string
◆ unsetParameter()
MediaWiki\OAuthClient\Request::unsetParameter |
( |
| $name | ) |
|
The documentation for this class was generated from the following file: