Oauth/Http/RequestToken.php

Show: PublicProtectedPrivateinherited
Table of Contents
Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.

Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Oauth  
Version
$Id: RequestToken.php 24593 2012-01-05 20:35:02Z matthew $  

\Zend_Oauth_Http_RequestToken

Package: Zend\Oauth
Parent(s)
\Zend_Oauth_Http
Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Properties

>VPropertyprotectedstring $_consumer = null
inherited
Reference to the Zend_Oauth_Consumer instance in use.
Inherited from: \Zend_Oauth_Http::$$_consumer
Default valuenullDetails
Type
string
Inherited_from
\Zend_Oauth_Http::$$_consumer  
>VPropertyprotected\Zend_Http_Client $_httpClient = null
Singleton instance if required of the HTTP client
Default valuenullDetails
Type
\Zend_Http_Client
>VPropertyprotected\Zend_Oauth_Http_Utility $_httpUtility = null
inherited
Instance of the general Zend_Oauth_Http_Utility class.
Inherited from: \Zend_Oauth_Http::$$_httpUtility
Default valuenullDetails
Type
\Zend_Oauth_Http_Utility
Inherited_from
\Zend_Oauth_Http::$$_httpUtility  
>VPropertyprotectedarray $_parameters = array()
inherited
Array of all custom service parameters to be sent in the HTTP request in addition to the usual OAuth parameters.
Inherited from: \Zend_Oauth_Http::$$_parameters
Default valuearray()Details
Type
array
Inherited_from
\Zend_Oauth_Http::$$_parameters  
>VPropertyprotectedstring $_preferredRequestMethod = \Zend_Oauth::POST
inherited
Request Method for the HTTP Request.
Inherited from: \Zend_Oauth_Http::$$_preferredRequestMethod
Default value\Zend_Oauth::POSTDetails
Type
string
Inherited_from
\Zend_Oauth_Http::$$_preferredRequestMethod  
>VPropertyprotectedstring $_preferredRequestScheme = null
inherited
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.
Inherited from: \Zend_Oauth_Http::$$_preferredRequestScheme
Default valuenullDetails
Type
string
Inherited_from
\Zend_Oauth_Http::$$_preferredRequestScheme  

Methods

methodpublic__construct(\Zend_Oauth_Consumer $consumer, null | array $parameters = null, null | \Zend_Oauth_Http_Utility $utility = null) : void
inherited

Constructor

Inherited from: \Zend_Oauth_Http::__construct()
Parameters
NameTypeDescription
$consumer\Zend_Oauth_Consumer
$parametersnull | array
$utilitynull | \Zend_Oauth_Http_Utility
methodprotected_assessRequestAttempt(\Zend_Http_Response $response = null) : void
inherited

Manages the switch from OAuth request scheme to another lower preference scheme during a request cycle.

Inherited from: \Zend_Oauth_Http::_assessRequestAttempt()
Parameters
NameTypeDescription
$response\Zend_Http_Response
Throws
ExceptionDescription
\Zend_Oauth_Exceptionif unable to retrieve valid token response
methodprotected_attemptRequest(array $params) : \Zend_Http_Response

Attempt a request based on the current configured OAuth Request Scheme and return the resulting HTTP Response.

Parameters
NameTypeDescription
$paramsarray
Returns
TypeDescription
\Zend_Http_Response
methodprotected_toAuthorizationHeader(array $params, string $realm = null) : string
inherited

Generates a valid OAuth Authorization header based on the provided parameters and realm.

Inherited from: \Zend_Oauth_Http::_toAuthorizationHeader()
Parameters
NameTypeDescription
$paramsarray
$realmstring
Returns
TypeDescription
string
methodpublicassembleParams() : array

Assemble all parameters for an OAuth Request Token request.

Returns
TypeDescription
array
methodpublicexecute() : \Zend_Oauth_Token_Request

Initiate a HTTP request to retrieve a Request Token.

Returns
TypeDescription
\Zend_Oauth_Token_Request
methodpublicgetConsumer() : \Zend_Oauth_Consumer
inherited

Return the Consumer instance in use.

Inherited from: \Zend_Oauth_Http::getConsumer()
Returns
TypeDescription
\Zend_Oauth_Consumer
methodpublicgetMethod() : string
inherited

Preferred HTTP request method accessor.

Inherited from: \Zend_Oauth_Http::getMethod()
Returns
TypeDescription
string
methodpublicgetParameters() : array
inherited

Accessor for an array of custom parameters.

Inherited from: \Zend_Oauth_Http::getParameters()
Returns
TypeDescription
array
methodpublicgetRequestSchemeHeaderClient(array $params) : \Zend_Http_Client

Generate and return a HTTP Client configured for the Header Request Scheme specified by OAuth, for use in requesting a Request Token.

Parameters
NameTypeDescription
$paramsarray
Returns
TypeDescription
\Zend_Http_Client
methodpublicgetRequestSchemePostBodyClient(array $params) : \Zend_Http_Client

Generate and return a HTTP Client configured for the POST Body Request Scheme specified by OAuth, for use in requesting a Request Token.

Parameters
NameTypeDescription
$paramsarray
Returns
TypeDescription
\Zend_Http_Client
methodpublicgetRequestSchemeQueryStringClient(array $params, string $url) : \Zend_Http_Client
inherited

Return an instance of Zend_Http_Client configured to use the Query String scheme for an OAuth driven HTTP request.

Inherited from: \Zend_Oauth_Http::getRequestSchemeQueryStringClient()
Parameters
NameTypeDescription
$paramsarray
$urlstring
Returns
TypeDescription
\Zend_Http_Client
methodpublicsetMethod(string $method) : \Zend_Oauth_Http
inherited

Set a preferred HTTP request method.

Inherited from: \Zend_Oauth_Http::setMethod()
Parameters
NameTypeDescription
$methodstring
Returns
TypeDescription
\Zend_Oauth_Http
methodpublicsetParameters(array $customServiceParameters) : \Zend_Oauth_Http
inherited

Mutator to set an array of custom parameters for the HTTP request.

Inherited from: \Zend_Oauth_Http::setParameters()
Parameters
NameTypeDescription
$customServiceParametersarray
Returns
TypeDescription
\Zend_Oauth_Http
methodpublicstartRequestCycle(array $params) : \Zend_Http_Response
inherited

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.

Inherited from: \Zend_Oauth_Http::startRequestCycle()

On success, return the Request object that results for processing.

Parameters
NameTypeDescription
$paramsarray
Returns
TypeDescription
\Zend_Http_Response
Throws
ExceptionDescription
\Zend_Oauth_Exceptionon HTTP request errors
Documentation was generated by phpDocumentor 2.0.0a12.