Zend Framework
1.12
|
Public Member Functions | |
__construct (Zend_OpenId_Consumer_Storage $storage=null, $dumbMode=false) | |
Constructs a Zend_OpenId_Consumer object with given $storage. | |
login ($id, $returnTo=null, $root=null, $extensions=null, Zend_Controller_Response_Abstract $response=null) | |
Performs check (with possible user interaction) of OpenID identity. | |
check ($id, $returnTo=null, $root=null, $extensions=null, Zend_Controller_Response_Abstract $response=null) | |
Performs immediate check (without user interaction) of OpenID identity. | |
verify ($params, &$identity="", $extensions=null) | |
Verifies authentication response from OpenID server. | |
setHttpClient ($client) | |
Sets HTTP client object to make HTTP requests. | |
getHttpClient () | |
Returns HTTP client object that will be used to make HTTP requests. | |
setSession (Zend_Session_Namespace $session) | |
Sets session object to store climed_id. | |
getSession () | |
Returns session object that is used to store climed_id. | |
getError () | |
Returns error message that explains failure of login, check or verify. | |
Protected Member Functions | |
_addAssociation ($url, $handle, $macFunc, $secret, $expires) | |
Store assiciation in internal chace and external storage. | |
_getAssociation ($url, &$handle, &$macFunc, &$secret, &$expires) | |
Retrive assiciation information for given $url from internal cahce or external storage. | |
_httpRequest ($url, $method= 'GET', array $params=array(), &$status=null) | |
Performs HTTP request to given $url using given HTTP $method. | |
_associate ($url, $version, $priv_key=null) | |
Create (or reuse existing) association between OpenID consumer and OpenID server based on Diffie-Hellman key agreement. | |
_discovery (&$id, &$server, &$version) | |
Performs discovery of identity and finds OpenID URL, OpenID server URL and OpenID protocol version. | |
_checkId ($immediate, $id, $returnTo=null, $root=null, $extensions=null, Zend_Controller_Response_Abstract $response=null) | |
Performs check of OpenID identity. | |
_setError ($message) | |
Saves error message. | |
Protected Attributes | |
$_signParams = array('op_endpoint', 'return_to', 'response_nonce', 'assoc_handle') | |
Parameters required for signature. | |
$_storage = null | |
Reference to an implementation of storage object. | |
$_dumbMode = false | |
Enables or disables consumer to use association with server based on Diffie-Hellman key agreement. | |
$_cache = array() | |
Internal cache to prevent unnecessary access to storage. | |
__construct | ( | Zend_OpenId_Consumer_Storage | $storage = null , |
$dumbMode = false |
|||
) |
Constructs a Zend_OpenId_Consumer object with given $storage.
Enables or disables future association with server based on Diffie-Hellman key agreement.
Zend_OpenId_Consumer_Storage | $storage | implementation of custom storage object |
bool | $dumbMode | Enables or disables consumer to use association with server based on Diffie-Hellman key agreement |
|
protected |
Store assiciation in internal chace and external storage.
string | $url | OpenID server url |
string | $handle | association handle |
string | $macFunc | HMAC function (sha1 or sha256) |
string | $secret | shared secret |
integer | $expires | expiration UNIX time |
|
protected |
Create (or reuse existing) association between OpenID consumer and OpenID server based on Diffie-Hellman key agreement.
Returns true on success and false on failure.
string | $url | OpenID server url |
float | $version | OpenID protocol version |
string | $priv_key | for testing only |
|
protected |
Performs check of OpenID identity.
This is the first step of OpenID authentication process. On success the function does not return (it does HTTP redirection to server and exits). On failure it returns false.
bool | $immediate | enables or disables interaction with user |
string | $id | OpenID identity |
string | $returnTo | HTTP URL to redirect response from server to |
string | $root | HTTP URL to identify consumer on server |
mixed | $extensions | extension object or array of extensions objects |
Zend_Controller_Response_Abstract | $response | an optional response object to perform HTTP or HTML form redirection |
|
protected |
Performs discovery of identity and finds OpenID URL, OpenID server URL and OpenID protocol version.
Returns true on succees and false on failure.
string | &$id | OpenID identity URL |
string | &$server | OpenID server URL |
float | &$version | OpenID protocol version |
|
protected |
Retrive assiciation information for given $url from internal cahce or external storage.
string | $url | OpenID server url |
string | &$handle | association handle |
string | &$macFunc | HMAC function (sha1 or sha256) |
string | &$secret | shared secret |
integer | &$expires | expiration UNIX time |
|
protected |
Performs HTTP request to given $url using given HTTP $method.
Send additinal query specified by variable/value array, On success returns HTTP response without headers, false on failure.
string | $url | OpenID server url |
string | $method | HTTP request method 'GET' or 'POST' |
array | $params | additional qwery parameters to be passed with |
int | &$staus | HTTP status code request |
|
protected |
Saves error message.
string | $message | error message |
check | ( | $id, | |
$returnTo = null , |
|||
$root = null , |
|||
$extensions = null , |
|||
Zend_Controller_Response_Abstract | $response = null |
||
) |
Performs immediate check (without user interaction) of OpenID identity.
This is the first step of OpenID authentication process. On success the function does not return (it does HTTP redirection to server and exits). On failure it returns false.
string | $id | OpenID identity |
string | $returnTo | HTTP URL to redirect response from server to |
string | $root | HTTP URL to identify consumer on server |
mixed | $extensions | extension object or array of extensions objects |
Zend_Controller_Response_Abstract | $response | an optional response object to perform HTTP or HTML form redirection |
getError | ( | ) |
Returns error message that explains failure of login, check or verify.
getHttpClient | ( | ) |
Returns HTTP client object that will be used to make HTTP requests.
getSession | ( | ) |
Returns session object that is used to store climed_id.
login | ( | $id, | |
$returnTo = null , |
|||
$root = null , |
|||
$extensions = null , |
|||
Zend_Controller_Response_Abstract | $response = null |
||
) |
Performs check (with possible user interaction) of OpenID identity.
This is the first step of OpenID authentication process. On success the function does not return (it does HTTP redirection to server and exits). On failure it returns false.
string | $id | OpenID identity |
string | $returnTo | URL to redirect response from server to |
string | $root | HTTP URL to identify consumer on server |
mixed | $extensions | extension object or array of extensions objects |
Zend_Controller_Response_Abstract | $response | an optional response object to perform HTTP or HTML form redirection |
setHttpClient | ( | $client | ) |
Sets HTTP client object to make HTTP requests.
Zend_Http_Client | $client | HTTP client object to be used |
setSession | ( | Zend_Session_Namespace | $session | ) |
Sets session object to store climed_id.
Zend_Session_Namespace | $session | HTTP client object to be used |
verify | ( | $params, | |
& | $identity = "" , |
||
$extensions = null |
|||
) |
Verifies authentication response from OpenID server.
This is the second step of OpenID authentication process. The function returns true on successful authentication and false on failure.
array | $params | HTTP query data from OpenID server |
string | &$identity | this argument is set to end-user's claimed identifier or OpenID provider local identifier. |
mixed | $extensions | extension object or array of extensions objects |
|
protected |
Internal cache to prevent unnecessary access to storage.
|
protected |
Enables or disables consumer to use association with server based on Diffie-Hellman key agreement.
|
protected |
Parameters required for signature.
|
protected |
Reference to an implementation of storage object.