TYPO3 CMS  TYPO3_6-2
TYPO3\CMS\Openid\OpenidStore Class Reference
Inheritance diagram for TYPO3\CMS\Openid\OpenidStore:
Auth_OpenID_OpenIDStore tx_openid_store

Public Member Functions

 __construct ($databaseConnection=NULL)
 
 storeAssociation ($serverUrl, $association)
 
 cleanupAssociations ()
 
 getAssociation ($serverUrl, $handle=NULL)
 
 removeAssociation ($serverUrl, $handle)
 
 cleanupNonces ()
 
 useNonce ($serverUrl, $timestamp, $salt)
 
 reset ()
 
- Public Member Functions inherited from Auth_OpenID_OpenIDStore
 storeAssociation ($server_url, $association)
 
 cleanupNonces ()
 
 cleanupAssociations ()
 
 cleanup ()
 
 supportsCleanup ()
 
 getAssociation ($server_url, $handle=null)
 
 removeAssociation ($server_url, $handle)
 
 useNonce ($server_url, $timestamp, $salt)
 
 reset ()
 

Public Attributes

const ASSOCIATION_TABLE_NAME = 'tx_openid_assoc_store'
 
const NONCE_TABLE_NAME = 'tx_openid_nonce_store'
 
const ASSOCIATION_EXPIRATION_SAFETY_INTERVAL = 120
 
const NONCE_STORAGE_TIME = 864000
 

Protected Member Functions

 doesAssociationExist ($serverUrl, $association)
 
 updateExistingAssociation ($serverUrl, \Auth_OpenID_Association $association)
 
 storeNewAssociation ($serverUrl, $association)
 
 updateAssociationTimeStamp ($recordId)
 

Protected Attributes

 $databaseConnection
 

Detailed Description

This file is part of the TYPO3 CMS project.

It is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, either version 2 of the License, or any later version.

For the full copyright and license information, please read the LICENSE.txt file that was distributed with this source code.

The TYPO3 project - inspiring people to share! This class is a TYPO3-specific OpenID store.

Author
Dmitry Dulepov dmitr.nosp@m.y.du.nosp@m.lepov.nosp@m.@gma.nosp@m.il.co.nosp@m.m

Definition at line 24 of file OpenidStore.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Openid\OpenidStore::__construct (   $databaseConnection = NULL)
Parameters
null | \TYPO3\CMS\Core\Database\DatabaseConnection$databaseConnection

Definition at line 41 of file OpenidStore.php.

References TYPO3\CMS\Openid\OpenidStore\$databaseConnection, and $GLOBALS.

Member Function Documentation

◆ cleanupAssociations()

TYPO3\CMS\Openid\OpenidStore::cleanupAssociations ( )

Removes all expired associations.

Returns
integer A number of removed associations

Definition at line 68 of file OpenidStore.php.

Referenced by TYPO3\CMS\Openid\OpenidStore\getAssociation().

◆ cleanupNonces()

TYPO3\CMS\Openid\OpenidStore::cleanupNonces ( )

Removes old nonces

Returns
void

Definition at line 122 of file OpenidStore.php.

◆ doesAssociationExist()

TYPO3\CMS\Openid\OpenidStore::doesAssociationExist (   $serverUrl,
  $association 
)
protected

Checks if such association exists.

Parameters
string$serverUrlServer URL
\Auth_OpenID_Association$associationOpenID association
Returns
boolean

Definition at line 168 of file OpenidStore.php.

Referenced by TYPO3\CMS\Openid\OpenidStore\storeAssociation().

◆ getAssociation()

TYPO3\CMS\Openid\OpenidStore::getAssociation (   $serverUrl,
  $handle = NULL 
)

Obtains the association to the server

Parameters
string$serverUrlServer URL
string$handleAssociation handle (optional)
Returns

Definition at line 81 of file OpenidStore.php.

References $result, TYPO3\CMS\Openid\OpenidStore\cleanupAssociations(), and TYPO3\CMS\Openid\OpenidStore\updateAssociationTimeStamp().

◆ removeAssociation()

TYPO3\CMS\Openid\OpenidStore::removeAssociation (   $serverUrl,
  $handle 
)

Removes the association

Parameters
string$serverUrlServer URL
string$handleAssociation handle (optional)
Returns
boolean TRUE if the association existed

Definition at line 110 of file OpenidStore.php.

◆ reset()

TYPO3\CMS\Openid\OpenidStore::reset ( )

Resets the store by removing all data in it

Returns
void

Definition at line 156 of file OpenidStore.php.

◆ storeAssociation()

TYPO3\CMS\Openid\OpenidStore::storeAssociation (   $serverUrl,
  $association 
)

Sores the association for future use

Parameters
string$serverUrlServer URL
\Auth_OpenID_Association$associationOpenID association
Returns
void

Definition at line 52 of file OpenidStore.php.

References TYPO3\CMS\Openid\OpenidStore\doesAssociationExist(), TYPO3\CMS\Openid\OpenidStore\storeNewAssociation(), and TYPO3\CMS\Openid\OpenidStore\updateExistingAssociation().

◆ storeNewAssociation()

TYPO3\CMS\Openid\OpenidStore::storeNewAssociation (   $serverUrl,
  $association 
)
protected

Stores new association to the database.

Parameters
string$serverUrlServer URL
\Auth_OpenID_Association$associationOpenID association
Returns
void

Definition at line 198 of file OpenidStore.php.

Referenced by TYPO3\CMS\Openid\OpenidStore\storeAssociation().

◆ updateAssociationTimeStamp()

TYPO3\CMS\Openid\OpenidStore::updateAssociationTimeStamp (   $recordId)
protected

Updates association time stamp.

Parameters
integer$recordIdAssociation record id in the database
Returns
void

Definition at line 219 of file OpenidStore.php.

Referenced by TYPO3\CMS\Openid\OpenidStore\getAssociation().

◆ updateExistingAssociation()

TYPO3\CMS\Openid\OpenidStore::updateExistingAssociation (   $serverUrl,
\Auth_OpenID_Association  $association 
)
protected

Updates existing association.

Parameters
string$serverUrlServer URL
\Auth_OpenID_Association$associationOpenID association
Returns
void

Definition at line 181 of file OpenidStore.php.

Referenced by TYPO3\CMS\Openid\OpenidStore\storeAssociation().

◆ useNonce()

TYPO3\CMS\Openid\OpenidStore::useNonce (   $serverUrl,
  $timestamp,
  $salt 
)

Checks if this nonce was already used

Parameters
string$serverUrlServer URL
integer$timestampTime stamp
string$saltNonce value
Returns
boolean TRUE if nonce was not used before anc can be used now

Definition at line 135 of file OpenidStore.php.

References $GLOBALS, and $result.

Member Data Documentation

◆ $databaseConnection

TYPO3\CMS\Openid\OpenidStore::$databaseConnection
protected

Definition at line 36 of file OpenidStore.php.

Referenced by TYPO3\CMS\Openid\OpenidStore\__construct().

◆ ASSOCIATION_EXPIRATION_SAFETY_INTERVAL

const TYPO3\CMS\Openid\OpenidStore::ASSOCIATION_EXPIRATION_SAFETY_INTERVAL = 120

Definition at line 29 of file OpenidStore.php.

◆ ASSOCIATION_TABLE_NAME

const TYPO3\CMS\Openid\OpenidStore::ASSOCIATION_TABLE_NAME = 'tx_openid_assoc_store'

Definition at line 26 of file OpenidStore.php.

◆ NONCE_STORAGE_TIME

const TYPO3\CMS\Openid\OpenidStore::NONCE_STORAGE_TIME = 864000

Definition at line 31 of file OpenidStore.php.

◆ NONCE_TABLE_NAME

const TYPO3\CMS\Openid\OpenidStore::NONCE_TABLE_NAME = 'tx_openid_nonce_store'

Definition at line 27 of file OpenidStore.php.