Basic oauth1 request handling for Stud.IP using PSR-7 http messages.
- Author
- Jan-Hendrik Willms tleil.nosp@m.ax+s.nosp@m.tudip.nosp@m.@gma.nosp@m.il.co.nosp@m.m GPL2 or any later version
- Since
- Stud.IP 6.0
◆ extractParameters()
static extractParameters |
( |
Request |
$request | ) |
|
|
static |
Extracts the oauth parameters either from the Authorization header or from the query string.
◆ getSignatureBaseString()
static getSignatureBaseString |
( |
Request |
$request | ) |
|
|
static |
Creates the base string for the signature. It consists of:
- The uppercase request method
- The request URL
- the sorted and urlencoded parameters of the request
The urlencoded parts are concatenated together into a single string separated by the '&' character.
◆ hash()
static hash |
( |
string |
$method, |
|
|
string |
$text, |
|
|
string |
$key |
|
) |
| |
|
static |
Hashes a given text with a given key by the given method.
- Exceptions
-
RuntimeException | if the given hash method is not supported |
◆ signRequest()
static signRequest |
( |
Request |
$request, |
|
|
string |
$consumerSecret, |
|
|
string |
$tokenSecret, |
|
|
string |
$method |
|
) |
| |
|
static |
Signs a given request.
- Exceptions
-
RuntimeException | if a request for any other oauth version then 1.0 shall be signed |
◆ urldecode()
static urldecode |
( |
string |
$input | ) |
|
|
static |
◆ urlencode()
static urlencode |
( |
string |
$input | ) |
|
|
static |
◆ verifyRequest()
static verifyRequest |
( |
Request |
$request, |
|
|
string |
$consumerSecret, |
|
|
string |
$tokenSecret |
|
) |
| |
|
static |
Verifies an oauth request.
- Exceptions
-
RuntimeException | if any necessary oauth parameter is missing |
The documentation for this class was generated from the following file: