OpenId/Provider/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_Provider
- Version
- $Id: File.php 24593 2012-01-05 20:35:02Z matthew $
\Zend_OpenId_Provider_Storage_File
External storage implemmentation using serialized files
- Parent(s)
- \Zend_OpenId_Provider_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 $handle, string $macFunc, string $secret, string $expires) : boolStores information about session identified by $handle
| Name | Type | Description |
|---|---|---|
| $handle | string | assiciation handle |
| $macFunc | string | HMAC function (sha1 or sha256) |
| $secret | string | shared secret |
| $expires | string | expiration UNIX time |
| Type | Description |
|---|---|
| bool |

addSite(string $id, string $site, mixed $trusted) : boolStores information about trusted/untrusted site for given user
| Name | Type | Description |
|---|---|---|
| $id | string | user identity URL |
| $site | string | site URL |
| $trusted | mixed | trust data from extension or just a boolean value |
| Type | Description |
|---|---|
| bool |

addUser(string $id, string $password) : boolRegister new user with given $id and $password Returns true in case of success and false if user with given $id already exists
| Name | Type | Description |
|---|---|---|
| $id | string | user identity URL |
| $password | string | encoded user password |
| Type | Description |
|---|---|
| bool |

checkUser(string $id, string $password) : boolVerify if user with given $id exists and has specified $password
| Name | Type | Description |
|---|---|---|
| $id | string | user identity URL |
| $password | string | user password |
| Type | Description |
|---|---|
| bool |

delAssociation(string $handle) : boolRemoves information about association identified by $handle
| Name | Type | Description |
|---|---|---|
| $handle | string | assiciation handle |
| Type | Description |
|---|---|
| bool |

delUser(string $id) : boolRemoves information abou specified user
| Name | Type | Description |
|---|---|---|
| $id | string | user identity URL |
| Type | Description |
|---|---|
| bool |

getAssociation(string $handle, string $macFunc, string $secret, string $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 |
| $macFunc | string | &$macFunc HMAC function (sha1 or sha256) |
| $secret | string | &$secret shared secret |
| $expires | string | &$expires expiration UNIX time |
| Type | Description |
|---|---|
| bool |

getTrustedSites(string $id) : arrayReturns array of all trusted/untrusted sites for given user identified by $id
| Name | Type | Description |
|---|---|---|
| $id | string | user identity URL |
| Type | Description |
|---|---|
| array |