\Zend_Oauth_Http
- Copyright: Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
- License: http://framework.zend.com/license/new-bsd New BSD License
Synopsis
class Zend_Oauth_Http
{
- // members
- protected array $_parameters = ;
- protected $_consumer = NULL;
- protected $_preferredRequestScheme = NULL;
- protected string $_preferredRequestMethod = Zend_Oauth::POST;
- protected Zend_Oauth_Http_Utility $_httpUtility = NULL;
- // methods
- public void __construct()
- public Zend_Oauth_Http setMethod()
- public string getMethod()
- public Zend_Oauth_Http setParameters()
- public array getParameters()
- public Zend_Oauth_Consumer getConsumer()
- public Zend_Http_Response startRequestCycle()
- public Zend_Http_Client getRequestSchemeQueryStringClient()
- protected void _assessRequestAttempt()
- protected string _toAuthorizationHeader()
Tasks
Line | Task |
---|---|
169+ | Remove cycling?; Replace with upfront do-or-die configuration |
Members
protected
- $_consumer
—
string
Reference to the Zend_Oauth_Consumer instance in use. - $_httpUtility
—
Zend_Oauth_Http_Utility
Instance of the general Zend_Oauth_Http_Utility class. - $_parameters
—
array
Array of all custom service parameters to be sent in the HTTP request in addition to the usual OAuth parameters. - $_preferredRequestMethod
—
string
Request Method for the HTTP Request. - $_preferredRequestScheme
—
string
OAuth specifies three request methods, this holds the current preferred one which by default uses the Authorization Header approach for passing OAuth parameters, and a POST body for non-OAuth custom parameters.
Methods
protected
- _assessRequestAttempt() — Manages the switch from OAuth request scheme to another lower preference scheme during a request cycle.
- _toAuthorizationHeader() — Generates a valid OAuth Authorization header based on the provided parameters and realm.
public
- __construct() — Constructor
- getConsumer() — Return the Consumer instance in use.
- getMethod() — Preferred HTTP request method accessor.
- getParameters() — Accessor for an array of custom parameters.
- getRequestSchemeQueryStringClient() — Return an instance of Zend_Http_Client configured to use the Query String scheme for an OAuth driven HTTP request.
- setMethod() — Set a preferred HTTP request method.
- setParameters() — Mutator to set an array of custom parameters for the HTTP request.
- startRequestCycle() — Commence a request cycle where the current HTTP method and OAuth request scheme set an upper preferred HTTP request style and where failures generate a new HTTP request style further down the OAuth preference list for OAuth Request Schemes.