oxOpenIdDb Class Reference

Inheritance diagram for oxOpenIdDb:
Inheritance graph
[legend]
Collaboration diagram for oxOpenIdDb:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 __construct ()
 storeAssociation ($sServerUrl, $oAssociation)
 removeAssociation ($sServerUrl, $sHandle)
 getAssociation ($sServerUrl, $sHandle=null)
 useNonce ($sServerUrl, $sTimestamp, $sSalt)
 cleanupNonces ()
 cleanupAssociations ()
 reset ()
 createTables ()
 blobEncode ($sSecret)
 blobDecode ($sSecret)

Protected Member Functions

 _getAssoc ($sServerUrl, $sHandle)
 _getAssocs ($sServerUrl)

Protected Attributes

 $_sAssociationsTable = null
 $_sNoncesTable = null
 $_oDB = null
 $_iMaxNonceAge = null

Detailed Description

Database connection class for openid

Definition at line 9 of file oxopeniddb.php.


Constructor & Destructor Documentation

oxOpenIdDb.__construct (  ) 

Class constructor

Returns:
null

Definition at line 44 of file oxopeniddb.php.


Member Function Documentation

oxOpenIdDb._getAssoc ( sServerUrl,
sHandle 
) [protected]

This method selects an association that matches the server URL and, if specified, handle.

Parameters:
string $sServerUrl the URL of the identity server
string $sHandle handle of the association to remove
Returns:
array $aRes

Definition at line 274 of file oxopeniddb.php.

oxOpenIdDb._getAssocs ( sServerUrl  )  [protected]

This method selects an association that matches the server URL

Parameters:
string $sServerUrl the URL of the identity server
Returns:
array $aRes

Definition at line 293 of file oxopeniddb.php.

oxOpenIdDb.blobDecode ( sSecret  ) 

Decodes secret parameter for storing

Parameters:
string $sSecret secret parameter
Returns:
string

Definition at line 324 of file oxopeniddb.php.

oxOpenIdDb.blobEncode ( sSecret  ) 

Encodes secret parameter for storing

Parameters:
string $sSecret secret parameter
Returns:
string

Definition at line 312 of file oxopeniddb.php.

oxOpenIdDb.cleanupAssociations (  ) 

Remove expired associations from the store.

Returns:
null

Definition at line 215 of file oxopeniddb.php.

oxOpenIdDb.cleanupNonces (  ) 

Remove expired nonces from the store.

Returns:
null

Definition at line 202 of file oxopeniddb.php.

oxOpenIdDb.createTables (  ) 

Creates tables if not exists

Returns:
null

Definition at line 238 of file oxopeniddb.php.

oxOpenIdDb.getAssociation ( sServerUrl,
sHandle = null 
)

This method returns an Association object from storage that matches the server URL and, if specified, handle. It returns null if no such association is found or if the matching association is expired.

If no handle is specified, the store may return any association which matches the server URL. If multiple associations are valid, the recommended return value for this method is the one most recently issued.

Parameters:
string $sServerUrl the URL of the identity server
string $sHandle handle of the association to remove
Returns:
object association for the given identity server.

Definition at line 110 of file oxopeniddb.php.

oxOpenIdDb.removeAssociation ( sServerUrl,
sHandle 
)

This method removes the matching association if it's found, and returns whether the association was removed or not.

Parameters:
string $sServerUrl the URL of the identity server
string $sHandle handle of the association to remove
Returns:
bool returns if given association exists

Definition at line 80 of file oxopeniddb.php.

oxOpenIdDb.reset (  ) 

Resets the store by removing all records from the store's tables.

Returns:
null

Definition at line 227 of file oxopeniddb.php.

oxOpenIdDb.storeAssociation ( sServerUrl,
oAssociation 
)

This method puts an Association object into storage, retrievable by server URL and handle.

Parameters:
string $sServerUrl the URL of the identity server
object $oAssociation the Association to store
Returns:
null

Definition at line 61 of file oxopeniddb.php.

oxOpenIdDb.useNonce ( sServerUrl,
sTimestamp,
sSalt 
)

Called when using a nonce.

This method should return true if the nonce has not been used before, and store it for a while to make sure nobody tries to use the same value again. If the nonce has already been used, return false.

Parameters:
string $sServerUrl the URL of the identity server
string $sTimestamp timestamp
string $sSalt salt
Returns:
bool if nonce was valid.

Definition at line 186 of file oxopeniddb.php.


Member Data Documentation

oxOpenIdDb.$_iMaxNonceAge = null [protected]

Definition at line 37 of file oxopeniddb.php.

oxOpenIdDb.$_oDB = null [protected]

Definition at line 30 of file oxopeniddb.php.

oxOpenIdDb.$_sAssociationsTable = null [protected]

Definition at line 16 of file oxopeniddb.php.

oxOpenIdDb.$_sNoncesTable = null [protected]

Definition at line 23 of file oxopeniddb.php.


The documentation for this class was generated from the following file:

Generated by  doxygen 1.6.2