Oauth/Config.php
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: Config.php 25167 2012-12-19 16:28:01Z matthew $
\Zend_Oauth_Config
- Implements
- \Zend_Oauth_Config_ConfigInterface
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Properties


string $_accessTokenUrl = null
When absent, assumed siteUrl+'/access_token'
null
Details- Type
- string


string $_authorizeUrl = null
When absent, assumed siteUrl+'/authorize'
null
Details- Type
- string


string $_callbackUrl = null
It's optional since a Provider may ask for this to be defined in advance when registering a new application for a Consumer Key.
null
Details- Type
- string


string $_consumerSecret = null
null
Details- Type
- string


string $_requestMethod = \Zend_Oauth::POST
Generally a default of POST works fine unless a Provider specifically requires otherwise.
\Zend_Oauth::POST
Details- Type
- string


string $_requestScheme = \Zend_Oauth::REQUEST_SCHEME_HEADER
The other two are POST Body and Query String.
\Zend_Oauth::REQUEST_SCHEME_HEADER
Details- Type
- string


string $_requestTokenUrl = null
When absent, assumed siteUrl+'/request_token'
null
Details- Type
- string


\Zend_Crypt_Rsa_Key_Private $_rsaPrivateKey = null
null
Details

\Zend_Crypt_Rsa_Key_Public $_rsaPublicKey = null
null
Details

string $_signatureMethod = 'HMAC-SHA1'
'HMAC-SHA1'
Details- Type
- string


string $_siteUrl = null
null
Details- Type
- string


\Zend_Oauth_Token $_token = null
null
DetailsMethods


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


getAccessTokenUrl() : string
Get access token URL
If no access token URL has been set, but a site URL has, returns the site URL with the string "/access_token" appended.
Type | Description |
---|---|
string |


getAuthorizeUrl() : string
Get authorization URL
If no authorization URL has been set, but a site URL has, returns the site URL with the string "/authorize" appended.
Type | Description |
---|---|
string |


getConsumerSecret() : string
Get consumer secret
Returns RSA private key if set; otherwise, returns any previously set consumer secret.
Type | Description |
---|---|
string |


getRequestTokenUrl() : string
Get request token URL
If no request token URL has been set, but a site URL has, returns the site URL with the string "/request_token" appended.
Type | Description |
---|---|
string |


getRsaPrivateKey() : \Zend_Crypt_Rsa_Key_Private
Get RSA private key
Type | Description |
---|---|
\Zend_Crypt_Rsa_Key_Private |


getRsaPublicKey() : \Zend_Crypt_Rsa_Key_Public
Get RSA public key
Type | Description |
---|---|
\Zend_Crypt_Rsa_Key_Public |


setAccessTokenUrl(string $url) : \Zend_Oauth_Config
Set access token URL
Name | Type | Description |
---|---|---|
$url | string |
Type | Description |
---|---|
\Zend_Oauth_Config |
Exception | Description |
---|---|
\Zend_Oauth_Exception | for invalid URLs |


setAuthorizeUrl(string $url) : \Zend_Oauth_Config
Set authorization URL
Name | Type | Description |
---|---|---|
$url | string |
Type | Description |
---|---|
\Zend_Oauth_Config |
Exception | Description |
---|---|
\Zend_Oauth_Exception | for invalid URLs |


setCallbackUrl(string $url) : \Zend_Oauth_Config
Set callback URL
Name | Type | Description |
---|---|---|
$url | string |
Type | Description |
---|---|
\Zend_Oauth_Config |
Exception | Description |
---|---|
\Zend_Oauth_Exception | for invalid URLs |


setConsumerKey(string $key) : \Zend_Oauth_Config
Set consumer key
Name | Type | Description |
---|---|---|
$key | string |
Type | Description |
---|---|
\Zend_Oauth_Config |


setConsumerSecret(string $secret) : \Zend_Oauth_Config
Set consumer secret
Name | Type | Description |
---|---|---|
$secret | string |
Type | Description |
---|---|
\Zend_Oauth_Config |


setOptions(array | \Zend_Config $options) : \Zend_Oauth_Config
Parse option array or Zend_Config instance and setup options using their relevant mutators.
Name | Type | Description |
---|---|---|
$options | array | \Zend_Config |
Type | Description |
---|---|
\Zend_Oauth_Config |


setRealm(string $realm) : \Zend_Oauth_Config
Set OAuth realm
Name | Type | Description |
---|---|---|
$realm | string |
Type | Description |
---|---|
\Zend_Oauth_Config |


setRequestMethod(string $method) : \Zend_Oauth_Config
Set request method
Name | Type | Description |
---|---|---|
$method | string |
Type | Description |
---|---|
\Zend_Oauth_Config |
Exception | Description |
---|---|
\Zend_Oauth_Exception | for invalid request methods |


setRequestScheme(string $scheme) : \Zend_Oauth_Config
Set request scheme
Name | Type | Description |
---|---|---|
$scheme | string |
Type | Description |
---|---|
\Zend_Oauth_Config |
Exception | Description |
---|---|
\Zend_Oauth_Exception | if invalid scheme specified, or if POSTBODY set when request method of GET is specified |


setRequestTokenUrl(string $url) : \Zend_Oauth_Config
Set request token URL
Name | Type | Description |
---|---|---|
$url | string |
Type | Description |
---|---|
\Zend_Oauth_Config |
Exception | Description |
---|---|
\Zend_Oauth_Exception | for invalid URLs |


setRsaPrivateKey(\Zend_Crypt_Rsa_Key_Private $key) : \Zend_Oauth_Config
Set RSA private key
Name | Type | Description |
---|---|---|
$key | \Zend_Crypt_Rsa_Key_Private |
Type | Description |
---|---|
\Zend_Oauth_Config |


setRsaPublicKey(\Zend_Crypt_Rsa_Key_Public $key) : \Zend_Oauth_Config
Set RSA public key
Name | Type | Description |
---|---|---|
$key | \Zend_Crypt_Rsa_Key_Public |
Type | Description |
---|---|
\Zend_Oauth_Config |


setSignatureMethod(string $method) : \Zend_Oauth_Config
Set signature method
Name | Type | Description |
---|---|---|
$method | string |
Type | Description |
---|---|
\Zend_Oauth_Config |
Exception | Description |
---|---|
\Zend_Oauth_Exception | if unsupported signature method specified |


setSiteUrl(string $url) : \Zend_Oauth_Config
Set site URL
Name | Type | Description |
---|---|---|
$url | string |
Type | Description |
---|---|
\Zend_Oauth_Config |
Exception | Description |
---|---|
\Zend_Oauth_Exception | for invalid URLs |


setToken(\Zend_Oauth_Token $token) : \Zend_Oauth_Config
Set OAuth token
Name | Type | Description |
---|---|---|
$token | \Zend_Oauth_Token |
Type | Description |
---|---|
\Zend_Oauth_Config |


setUserAuthorizationUrl(string $url) : \Zend_Oauth_Config
Set user authorization URL
Name | Type | Description |
---|---|---|
$url | string |
Type | Description |
---|---|
\Zend_Oauth_Config |
Exception | Description |
---|---|
\Zend_Oauth_Exception | for invalid URLs |


setVersion(string $version) : \Zend_Oauth_Config
Set version
Name | Type | Description |
---|---|---|
$version | string |
Type | Description |
---|---|
\Zend_Oauth_Config |