Zend Framework
1.12
|
Public Member Functions | |
__construct ($options=null) | |
Constructor; create a new object with an optional array|Zend_Config instance containing initialising options. | |
getRequestToken (array $customServiceParameters=null, $httpMethod=null, Zend_Oauth_Http_RequestToken $request=null) | |
Attempts to retrieve a Request Token from an OAuth Provider which is later exchanged for an authorized Access Token used to access the protected resources exposed by a web service API. | |
getRedirectUrl (array $customServiceParameters=null, Zend_Oauth_Token_Request $token=null, Zend_Oauth_Http_UserAuthorization $redirect=null) | |
After a Request Token is retrieved, the user may be redirected to the OAuth Provider to authorize the application's access to their protected resources - the redirect URL being provided by this method. | |
redirect (array $customServiceParameters=null, Zend_Oauth_Token_Request $token=null, Zend_Oauth_Http_UserAuthorization $request=null) | |
Rather than retrieve a redirect URL for use, e.g. | |
getAccessToken ($queryData, Zend_Oauth_Token_Request $token, $httpMethod=null, Zend_Oauth_Http_AccessToken $request=null) | |
Retrieve an Access Token in exchange for a previously received/authorized Request Token. | |
getLastRequestToken () | |
Return whatever the last Request Token retrieved was while using the current Consumer instance. | |
getLastAccessToken () | |
Return whatever the last Access Token retrieved was while using the current Consumer instance. | |
getToken () | |
Alias to self::getLastAccessToken() | |
__call ($method, array $args) | |
Simple Proxy to the current Zend_Oauth_Config method. | |
Public Attributes | |
$switcheroo = false | |
![]() | |
const | REQUEST_SCHEME_HEADER = 'header' |
const | REQUEST_SCHEME_POSTBODY = 'postbody' |
const | REQUEST_SCHEME_QUERYSTRING = 'querystring' |
const | GET = 'GET' |
const | POST = 'POST' |
const | PUT = 'PUT' |
const | DELETE = 'DELETE' |
const | HEAD = 'HEAD' |
const | OPTIONS = 'OPTIONS' |
Protected Attributes | |
$_requestToken = null | |
$_accessToken = null | |
$_config = null | |
Additional Inherited Members | |
![]() | |
static | setHttpClient (Zend_Http_Client $httpClient) |
Allows the external environment to make Zend_Oauth use a specific Client instance. | |
static | getHttpClient () |
Return the singleton instance of the HTTP Client. | |
static | clearHttpClient () |
Simple mechanism to delete the entire singleton HTTP Client instance which forces an new instantiation for subsequent requests. | |
![]() | |
static | $httpClient = null |
__construct | ( | $options = null | ) |
Constructor; create a new object with an optional array|Zend_Config instance containing initialising options.
array | Zend_Config | $options |
__call | ( | $method, | |
array | $args | ||
) |
Simple Proxy to the current Zend_Oauth_Config method.
It's that instance which holds all configuration methods and values this object also presents as it's API.
string | $method | |
array | $args |
Zend_Oauth_Exception | if method does not exist in config object |
getAccessToken | ( | $queryData, | |
Zend_Oauth_Token_Request | $token, | ||
$httpMethod = null , |
|||
Zend_Oauth_Http_AccessToken | $request = null |
||
) |
Retrieve an Access Token in exchange for a previously received/authorized Request Token.
array | $queryData | GET data returned in user's redirect from Provider |
Zend_Oauth_Token_Request | Request Token information | |
string | $httpMethod | |
Zend_Oauth_Http_AccessToken | $request |
Zend_Oauth_Exception | on invalid authorization token, non-matching response authorization token, or unprovided authorization token |
getLastAccessToken | ( | ) |
Return whatever the last Access Token retrieved was while using the current Consumer instance.
getLastRequestToken | ( | ) |
Return whatever the last Request Token retrieved was while using the current Consumer instance.
getRedirectUrl | ( | array | $customServiceParameters = null , |
Zend_Oauth_Token_Request | $token = null , |
||
Zend_Oauth_Http_UserAuthorization | $redirect = null |
||
) |
After a Request Token is retrieved, the user may be redirected to the OAuth Provider to authorize the application's access to their protected resources - the redirect URL being provided by this method.
Once the user has authorized the application for access, they are redirected back to the application which can now exchange the previous Request Token for a fully authorized Access Token.
null | array | $customServiceParameters | |
null | Zend_Oauth_Token_Request | $token | |
null | Zend_OAuth_Http_UserAuthorization | $redirect |
getRequestToken | ( | array | $customServiceParameters = null , |
$httpMethod = null , |
|||
Zend_Oauth_Http_RequestToken | $request = null |
||
) |
Attempts to retrieve a Request Token from an OAuth Provider which is later exchanged for an authorized Access Token used to access the protected resources exposed by a web service API.
null | array | $customServiceParameters | Non-OAuth Provider-specified parameters |
null | string | $httpMethod | |
null | Zend_Oauth_Http_RequestToken | $request |
getToken | ( | ) |
Alias to self::getLastAccessToken()
redirect | ( | array | $customServiceParameters = null , |
Zend_Oauth_Token_Request | $token = null , |
||
Zend_Oauth_Http_UserAuthorization | $request = null |
||
) |
Rather than retrieve a redirect URL for use, e.g.
from a controller, one may perform an immediate redirect.
Sends headers and exit()s on completion.
null | array | $customServiceParameters | |
null | Zend_Oauth_Token_Request | $token | |
null | Zend_Oauth_Http_UserAuthorization | $request |
|
protected |
|
protected |
|
protected |
$switcheroo = false |