PHP Class Horde_Oauth_Request, horde

Author: Chuck Hagenbuch ([email protected])
Mostra file Open project: horde/horde Class Usage Examples

Protected Properties

Property Type Description
$_method
$_params
$_url

Public Methods

Method Description
__construct ( $url, $params = [], $method = 'POST' )
buildAuthorizationHeader ( $realm = '' )
buildHttpQuery ( ) Get a query string suitable for use in a URL or as POST data.
getSignatureBaseString ( ) Returns the signable string of this request
sign ( $signatureMethod, $consumer, $token = null ) : unknown_type Sign this request in accordance with OAuth

Protected Methods

Method Description
_generateNonce ( ) Generate a nonce.
_getNormalizedHttpMethod ( ) Uppercases the HTTP method
_getNormalizedUrl ( ) Parse the url and rebuilds it to be scheme://host/path
_getSignableParameters ( ) : string Returns the normalized parameters of the request

Method Details

__construct() public method

public __construct ( $url, $params = [], $method = 'POST' )

_generateNonce() protected static method

Generate a nonce.
protected static _generateNonce ( )

_getNormalizedHttpMethod() protected method

Uppercases the HTTP method
protected _getNormalizedHttpMethod ( )

_getNormalizedUrl() protected method

Parse the url and rebuilds it to be scheme://host/path
protected _getNormalizedUrl ( )

_getSignableParameters() protected method

This will be all parameters except oauth_signature, sorted first by key, and if there are duplicate keys, then by value. The returned string will be all the key=value pairs concatenated by &.
protected _getSignableParameters ( ) : string
return string

buildAuthorizationHeader() public method

public buildAuthorizationHeader ( $realm = '' )

buildHttpQuery() public method

Get a query string suitable for use in a URL or as POST data.
public buildHttpQuery ( )

getSignatureBaseString() public method

The base string is defined as the method, the url and the parameters (normalized), each urlencoded and concatenated with &.

sign() public method

Sign this request in accordance with OAuth
public sign ( $signatureMethod, $consumer, $token = null ) : unknown_type
$signatureMethod
$consumer
$token
return unknown_type

Property Details

$_method protected_oe property

protected $_method

$_params protected_oe property

protected $_params

$_url protected_oe property

protected $_url