Oauth/Consumer.php
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Oauth
- Version
- $Id$
\Zend_Oauth_Consumer
- Parent(s)
- \Zend_Oauth
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Properties

\Zend_Oauth_Token_Access $_accessToken = nullnullDetails
\Zend_Oauth_Token_Request $_requestToken = nullnullDetailsMethods

__call(string $method, array $args) : mixedSimple 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.
| Name | Type | Description |
|---|---|---|
| $method | string | |
| $args | array |
| Type | Description |
|---|---|
| mixed |
| Exception | Description |
|---|---|
| \Zend_Oauth_Exception | if method does not exist in config object |

__construct(array | \Zend_Config $options = null) : voidConstructor; create a new object with an optional array|Zend_Config instance containing initialising options.
| Name | Type | Description |
|---|---|---|
| $options | array | \Zend_Config |

getAccessToken(array $queryData, $token, string $httpMethod = null, \Zend_Oauth_Http_AccessToken $request = null) : \Zend_Oauth_Token_AccessRetrieve an Access Token in exchange for a previously received/authorized Request Token.
| Name | Type | Description |
|---|---|---|
| $queryData | array | GET data returned in user's redirect from Provider |
| $token | ||
| $httpMethod | string | |
| $request | \Zend_Oauth_Http_AccessToken |
| Type | Description |
|---|---|
| \Zend_Oauth_Token_Access |
| Exception | Description |
|---|---|
| \Zend_Oauth_Exception | on invalid authorization token, non-matching response authorization token, or unprovided authorization token |

getLastAccessToken() : \Zend_Oauth_Token_AccessReturn whatever the last Access Token retrieved was while using the current Consumer instance.
| Type | Description |
|---|---|
| \Zend_Oauth_Token_Access |

getLastRequestToken() : \Zend_Oauth_Token_RequestReturn whatever the last Request Token retrieved was while using the current Consumer instance.
| Type | Description |
|---|---|
| \Zend_Oauth_Token_Request |

getRedirectUrl(null | array $customServiceParameters = null, null | \Zend_Oauth_Token_Request $token = null, null | \Zend_OAuth_Http_UserAuthorization $redirect = null) : stringAfter 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.
| Name | Type | Description |
|---|---|---|
| $customServiceParameters | null | array | |
| $token | null | \Zend_Oauth_Token_Request | |
| $redirect | null | \Zend_OAuth_Http_UserAuthorization |
| Type | Description |
|---|---|
| string |

getRequestToken(null | array $customServiceParameters = null, null | string $httpMethod = null, null | \Zend_Oauth_Http_RequestToken $request = null) : \Zend_Oauth_Token_RequestAttempts 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.
| Name | Type | Description |
|---|---|---|
| $customServiceParameters | null | array | Non-OAuth Provider-specified parameters |
| $httpMethod | null | string | |
| $request | null | \Zend_Oauth_Http_RequestToken |
| Type | Description |
|---|---|
| \Zend_Oauth_Token_Request |

getToken() : \Zend_Oauth_Token_AccessAlias to self::getLastAccessToken()
| Type | Description |
|---|---|
| \Zend_Oauth_Token_Access |

redirect(null | array $customServiceParameters = null, null | \Zend_Oauth_Token_Request $token = null, null | \Zend_Oauth_Http_UserAuthorization $request = null) : voidRather than retrieve a redirect URL for use, e.g. from a controller, one may perform an immediate redirect.
| Name | Type | Description |
|---|---|---|
| $customServiceParameters | null | array | |
| $token | null | \Zend_Oauth_Token_Request | |
| $request | null | \Zend_Oauth_Http_UserAuthorization |