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 license@zend.com so we can send you a copy immediately.
- category
- Zend
- copyright
- Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
- license
-
New BSD License
- package
- Zend_OpenId
- subpackage
- Zend_OpenId_Provider
- version
- $Id: File.php 23775 2011-03-01 17:25:24Z ralph $
\Zend_OpenId_Provider_Storage_File
External storage implemmentation using serialized files
- Extends from
- \Zend_OpenId_Provider_Storage
- category
- Zend
- copyright
- Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
- license
-
New BSD License
- package
- Zend_OpenId
- subpackage
- Zend_OpenId_Provider
Properties
Methods



__construct(
string $dir
=
null
)
:
void
Constructs storage object and creates storage directory
Parameters
Name |
Type |
Description |
$dir |
string |
directory name to store data files in |
Throws



addAssociation(
string $handle, string $macFunc, string $secret, string $expires
)
:
bool
Stores information about session identified by $handle
Parameters
Name |
Type |
Description |
$handle |
string |
assiciation handle |
$macFunc |
string |
HMAC function (sha1 or sha256)
|
$secret |
string |
shared secret |
$expires |
string |
expiration UNIX time |
Returns



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



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



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



delAssociation(
string $handle
)
:
bool
Removes information about association identified by $handle
Parameters
Name |
Type |
Description |
$handle |
string |
assiciation handle |
Returns



delUser(
string $id
)
:
bool
Removes information abou specified user
Parameters
Name |
Type |
Description |
$id |
string |
user identity URL |
Returns



getAssociation(
string $handle, string $macFunc, string $secret, string $expires
)
:
bool
Gets information about association identified by $handle
Returns true if given association found and not expired and false
otherwise
Parameters
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
|
Returns



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



hasUser(
string $id
)
:
bool
Returns true if user with given $id exists and false otherwise
Parameters
Name |
Type |
Description |
$id |
string |
user identity URL |
Returns