Zeta Components Manual :: Docs For Class ezcAuthenticationOpenidDbStore
AuthenticationDatabaseTiein::ezcAuthenticationOpenidDbStore
Class ezcAuthenticationOpenidDbStore
Class providing database storage for OpenID authentication.
This class requires that the database used contains two special tables. See the tutorial for information on how to create those tables.
Example of use:
- // create an OpenID options object
- // define a database store
- // create an OpenID filter based on the options object
Source for this file: /AuthenticationDatabaseTiein/src/filters/openid/openid_db_store.php
ezcAuthenticationOpenidStore | --ezcAuthenticationOpenidDbStore
Version: | //autogentag// |
Properties
ezcDbHandler | read/write |
$instance
The database instance to use for database storage. |
Inherited Member Variables
From ezcAuthenticationOpenidStore | |
---|---|
protected |
ezcAuthenticationOpenidStore::$options
|
Method Summary
public ezcAuthenticationOpenidDbStore |
__construct(
$instance
, [ $options
= null] )
Creates a new object of this class. |
public ezcAuthenticationOpenidAssociation |
getAssociation(
$url
)
Returns the unserialized association linked to the OpenID provider URL. |
public bool |
removeAssociation(
$url
)
Removes the association linked to the OpenID provider URL. |
protected void |
removeNonce(
$nonce
)
Removes the nonce from the nonces table. |
public bool |
storeAssociation(
$url
, $association
)
Stores an association in the store linked to the OpenID provider URL. |
public bool |
storeNonce(
$nonce
)
Stores the nonce in the store. |
public bool|int |
useNonce(
$nonce
)
Checks if the nonce exists and afterwards deletes it. |
Inherited Methods
From ezcAuthenticationOpenidStore | |
---|---|
public abstract ezcAuthenticationOpenidAssociation |
ezcAuthenticationOpenidStore::getAssociation()
Returns the association linked to the OpenID provider URL. |
public ezcAuthenticationOpenidStoreOptions |
ezcAuthenticationOpenidStore::getOptions()
Returns the options of this class. |
public abstract bool |
ezcAuthenticationOpenidStore::removeAssociation()
Removes the association linked to the OpenID provider URL. |
public void |
ezcAuthenticationOpenidStore::setOptions()
Sets the options of this class to $options. |
public abstract bool |
ezcAuthenticationOpenidStore::storeAssociation()
Stores an association in the store linked to the OpenID provider URL. |
public abstract bool |
ezcAuthenticationOpenidStore::storeNonce()
Stores the nonce in the store. |
public abstract bool |
ezcAuthenticationOpenidStore::useNonce()
Checks if the nonce exists and afterwards deletes it. |
Methods
__construct
Creates a new object of this class.
Parameters:
Name | Type | Description |
---|---|---|
$instance |
ezcDbHandler | The database instance used for this store |
$options |
ezcAuthenticationOpenidDbStoreOptions | Options for this class |
getAssociation
Returns the unserialized association linked to the OpenID provider URL.
Returns false if the association could not be retrieved or if it expired.
Parameters:
Name | Type | Description |
---|---|---|
$url |
string | The URL of the OpenID provider |
Redefinition of:
Method | Description |
---|---|
ezcAuthenticationOpenidStore::getAssociation() |
Returns the association linked to the OpenID provider URL. |
removeAssociation
Removes the association linked to the OpenID provider URL.
Returns true always.
Parameters:
Name | Type | Description |
---|---|---|
$url |
string | The URL of the OpenID provider |
Redefinition of:
Method | Description |
---|---|
ezcAuthenticationOpenidStore::removeAssociation() |
Removes the association linked to the OpenID provider URL. |
removeNonce
Removes the nonce from the nonces table.
Parameters:
Name | Type | Description |
---|---|---|
$nonce |
string |
storeAssociation
Stores an association in the store linked to the OpenID provider URL.
Returns true always.
Parameters:
Name | Type | Description |
---|---|---|
$url |
string | The URL of the OpenID provider |
$association |
ezcAuthenticationOpenidAssociation | The association value to store |
Redefinition of:
Method | Description |
---|---|
ezcAuthenticationOpenidStore::storeAssociation() |
Stores an association in the store linked to the OpenID provider URL. |
storeNonce
Stores the nonce in the store.
Returns true if the nonce was stored successfully, and false otherwise.
Parameters:
Name | Type | Description |
---|---|---|
$nonce |
string | The nonce value to store |
Exceptions:
Type | Description |
---|---|
ezcBaseFilePermissionException |
if the nonce cannot be written in the store |
Redefinition of:
Method | Description |
---|---|
ezcAuthenticationOpenidStore::storeNonce() |
Stores the nonce in the store. |
useNonce
Checks if the nonce exists and afterwards deletes it.
Returns the timestamp of the nonce if it exists, and false otherwise.
Parameters:
Name | Type | Description |
---|---|---|
$nonce |
string | The nonce value to check and delete |
Redefinition of:
Method | Description |
---|---|
ezcAuthenticationOpenidStore::useNonce() |
Checks if the nonce exists and afterwards deletes it. |