TYPO3 CMS  TYPO3_6-2
Auth_OpenID_SQLStore Class Reference
Inheritance diagram for Auth_OpenID_SQLStore:
Auth_OpenID_OpenIDStore Auth_OpenID_MySQLStore Auth_OpenID_PostgreSQLStore Auth_OpenID_SQLiteStore

Public Member Functions

 Auth_OpenID_SQLStore ($connection, $associations_table=null, $nonces_table=null)
 
 tableExists ($table_name)
 
 isError ($value)
 
 resultToBool ($obj)
 
 setSQL ()
 
 reset ()
 
 _verifySQL ()
 
 _fixSQL ()
 
 blobDecode ($blob)
 
 blobEncode ($str)
 
 createTables ()
 
 create_nonce_table ()
 
 create_assoc_table ()
 
 _set_assoc ($server_url, $handle, $secret, $issued, $lifetime, $assoc_type)
 
 storeAssociation ($server_url, $association)
 
 _get_assoc ($server_url, $handle)
 
 _get_assocs ($server_url)
 
 removeAssociation ($server_url, $handle)
 
 getAssociation ($server_url, $handle=null)
 
 _add_nonce ($server_url, $timestamp, $salt)
 
 useNonce ($server_url, $timestamp, $salt)
 
 _octify ($str)
 
 _unoctify ($str)
 
 cleanupNonces ()
 
 cleanupAssociations ()
 
- 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 ()
 

Detailed Description

Definition at line 57 of file SQLStore.php.

Member Function Documentation

◆ _add_nonce()

Auth_OpenID_SQLStore::_add_nonce (   $server_url,
  $timestamp,
  $salt 
)

private

Definition at line 454 of file SQLStore.php.

References $result, $sql, isError(), and resultToBool().

Referenced by useNonce().

◆ _fixSQL()

Auth_OpenID_SQLStore::_fixSQL ( )

private

Definition at line 239 of file SQLStore.php.

Referenced by Auth_OpenID_SQLStore().

◆ _get_assoc()

Auth_OpenID_SQLStore::_get_assoc (   $server_url,
  $handle 
)

private

Definition at line 354 of file SQLStore.php.

References $result, and isError().

Referenced by Auth_OpenID_PostgreSQLStore\_set_assoc(), getAssociation(), and removeAssociation().

◆ _get_assocs()

Auth_OpenID_SQLStore::_get_assocs (   $server_url)

private

Definition at line 368 of file SQLStore.php.

References $result, and isError().

Referenced by getAssociation().

◆ _octify()

Auth_OpenID_SQLStore::_octify (   $str)

"Octifies" a binary string by returning a string with escaped octal bytes. This is used for preparing binary data for PostgreSQL BYTEA fields.

private

Definition at line 486 of file SQLStore.php.

References $result, and Auth_OpenID\bytes().

Referenced by Auth_OpenID_PostgreSQLStore\blobEncode().

◆ _set_assoc()

Auth_OpenID_SQLStore::_set_assoc (   $server_url,
  $handle,
  $secret,
  $issued,
  $lifetime,
  $assoc_type 
)

private

Definition at line 321 of file SQLStore.php.

Referenced by storeAssociation().

◆ _unoctify()

Auth_OpenID_SQLStore::_unoctify (   $str)

"Unoctifies" octal-escaped data from PostgreSQL and returns the resulting ASCII (possibly binary) string.

private

Definition at line 508 of file SQLStore.php.

References $result.

Referenced by Auth_OpenID_PostgreSQLStore\blobDecode().

◆ _verifySQL()

Auth_OpenID_SQLStore::_verifySQL ( )

private

Definition at line 211 of file SQLStore.php.

Referenced by Auth_OpenID_SQLStore().

◆ Auth_OpenID_SQLStore()

Auth_OpenID_SQLStore::Auth_OpenID_SQLStore (   $connection,
  $associations_table = null,
  $nonces_table = null 
)

This creates a new SQLStore instance. It requires an established database connection be given to it, and it allows overriding the default table names.

Parameters
connection$connectionThis must be an established connection to a database of the correct type for the SQLStore subclass you're using. This must either be an PEAR DB connection handle or an instance of a subclass of Auth_OpenID_DatabaseConnection.
associations_tableThis is an optional parameter to specify the name of the table used for storing associations. The default value is 'oid_associations'.
nonces_tableThis is an optional parameter to specify the name of the table used for storing nonces. The default value is 'oid_nonces'.

Definition at line 78 of file SQLStore.php.

References _fixSQL(), _verifySQL(), E_USER_ERROR, and setSQL().

◆ blobDecode()

Auth_OpenID_SQLStore::blobDecode (   $blob)

Definition at line 276 of file SQLStore.php.

Referenced by getAssociation().

◆ blobEncode()

Auth_OpenID_SQLStore::blobEncode (   $str)

Definition at line 281 of file SQLStore.php.

◆ cleanupAssociations()

Auth_OpenID_SQLStore::cleanupAssociations ( )

Definition at line 547 of file SQLStore.php.

◆ cleanupNonces()

Auth_OpenID_SQLStore::cleanupNonces ( )

Definition at line 536 of file SQLStore.php.

References $Auth_OpenID_SKEW.

◆ create_assoc_table()

Auth_OpenID_SQLStore::create_assoc_table ( )

Definition at line 309 of file SQLStore.php.

References resultToBool(), and tableExists().

Referenced by createTables().

◆ create_nonce_table()

Auth_OpenID_SQLStore::create_nonce_table ( )

Definition at line 300 of file SQLStore.php.

References resultToBool(), and tableExists().

Referenced by createTables().

◆ createTables()

Auth_OpenID_SQLStore::createTables ( )

Definition at line 286 of file SQLStore.php.

References create_assoc_table(), and create_nonce_table().

◆ getAssociation()

Auth_OpenID_SQLStore::getAssociation (   $server_url,
  $handle = null 
)

Definition at line 397 of file SQLStore.php.

References _get_assoc(), _get_assocs(), blobDecode(), and removeAssociation().

◆ isError()

Auth_OpenID_SQLStore::isError (   $value)

Returns true if $value constitutes a database error; returns false otherwise.

Definition at line 167 of file SQLStore.php.

Referenced by _add_nonce(), _get_assoc(), _get_assocs(), resultToBool(), and tableExists().

◆ removeAssociation()

Auth_OpenID_SQLStore::removeAssociation (   $server_url,
  $handle 
)

Definition at line 380 of file SQLStore.php.

References _get_assoc(), and resultToBool().

Referenced by getAssociation().

◆ reset()

Auth_OpenID_SQLStore::reset ( )

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

Definition at line 199 of file SQLStore.php.

◆ resultToBool()

Auth_OpenID_SQLStore::resultToBool (   $obj)

Converts a query result to a boolean. If the result is a database error according to $this->isError(), this returns false; otherwise, this returns true.

Definition at line 177 of file SQLStore.php.

References isError().

Referenced by _add_nonce(), create_assoc_table(), create_nonce_table(), removeAssociation(), and storeAssociation().

◆ setSQL()

Auth_OpenID_SQLStore::setSQL ( )

This method should be overridden by subclasses. This method is called by the constructor to set values in $this->sql, which is an array keyed on sql name.

Definition at line 191 of file SQLStore.php.

Referenced by Auth_OpenID_SQLStore().

◆ storeAssociation()

Auth_OpenID_SQLStore::storeAssociation (   $server_url,
  $association 
)

Definition at line 334 of file SQLStore.php.

References _set_assoc(), and resultToBool().

◆ tableExists()

Auth_OpenID_SQLStore::tableExists (   $table_name)

Definition at line 155 of file SQLStore.php.

References isError().

Referenced by create_assoc_table(), and create_nonce_table().

◆ useNonce()

Auth_OpenID_SQLStore::useNonce (   $server_url,
  $timestamp,
  $salt 
)

Definition at line 468 of file SQLStore.php.

References $Auth_OpenID_SKEW, and _add_nonce().