OpenId/Consumer/Storage/File.php
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 [email protected] 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_OpenId
- Subpackage
- Zend_OpenId_Consumer
- Version
- $Id: File.php 24593 2012-01-05 20:35:02Z matthew $
\Zend_OpenId_Consumer_Storage_File
External storage implemmentation using serialized files
- Parent(s)
- \Zend_OpenId_Consumer_Storage
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Properties
Methods

__construct(string $dir = null) : voidConstructs storage object and creates storage directory
| Name | Type | Description |
|---|---|---|
| $dir | string | directory name to store data files in |
| Exception | Description |
|---|---|
| \Zend_OpenId_Exception |

addAssociation(string $url, string $handle, string $macFunc, string $secret, \long $expires) : boolStores information about association identified by $url/$handle
| Name | Type | Description |
|---|---|---|
| $url | string | OpenID server URL |
| $handle | string | assiciation handle |
| $macFunc | string | HMAC function (sha1 or sha256) |
| $secret | string | shared secret |
| $expires | \long | expiration UNIX time |
| Type | Description |
|---|---|
| bool |

addDiscoveryInfo(string $id, string $realId, string $server, float $version, \long $expires) : boolStores information discovered from identity $id
| Name | Type | Description |
|---|---|---|
| $id | string | identity |
| $realId | string | discovered real identity URL |
| $server | string | discovered OpenID server URL |
| $version | float | discovered OpenID protocol version |
| $expires | \long | expiration UNIX time |
| Type | Description |
|---|---|
| bool |

delAssociation(string $url) : boolDeletes association identified by $url
| Name | Type | Description |
|---|---|---|
| $url | string | OpenID server URL |
| Type | Description |
|---|---|
| bool |

delDiscoveryInfo(string $id) : boolRemoves cached information discovered from identity $id
| Name | Type | Description |
|---|---|---|
| $id | string | identity |
| Type | Description |
|---|---|
| bool |

getAssociation(string $url, string $handle, string $macFunc, string $secret, \long $expires) : boolGets information about association identified by $url Returns true if given association found and not expired and false otherwise
| Name | Type | Description |
|---|---|---|
| $url | string | OpenID server URL |
| $handle | string | &$handle assiciation handle |
| $macFunc | string | &$macFunc HMAC function (sha1 or sha256) |
| $secret | string | &$secret shared secret |
| $expires | \long | &$expires expiration UNIX time |
| Type | Description |
|---|---|
| bool |

getAssociationByHandle(string $handle, string $url, string $macFunc, string $secret, \long $expires) : boolGets information about association identified by $handle Returns true if given association found and not expired and false otherwise
| Name | Type | Description |
|---|---|---|
| $handle | string | assiciation handle |
| $url | string | &$url OpenID server URL |
| $macFunc | string | &$macFunc HMAC function (sha1 or sha256) |
| $secret | string | &$secret shared secret |
| $expires | \long | &$expires expiration UNIX time |
| Type | Description |
|---|---|
| bool |

getDiscoveryInfo(string $id, string $realId, string $server, float $version, \long $expires) : boolGets information discovered from identity $id Returns true if such information exists and false otherwise
| Name | Type | Description |
|---|---|---|
| $id | string | identity |
| $realId | string | &$realId discovered real identity URL |
| $server | string | &$server discovered OpenID server URL |
| $version | float | &$version discovered OpenID protocol version |
| $expires | \long | &$expires expiration UNIX time |
| Type | Description |
|---|---|
| bool |

isUniqueNonce(string $provider, string $nonce) : boolThe function checks the uniqueness of openid.response_nonce
| Name | Type | Description |
|---|---|---|
| $provider | string | openid.openid_op_endpoint field from authentication response |
| $nonce | string | openid.response_nonce field from authentication response |
| Type | Description |
|---|---|
| bool |