|
TYPO3 API
SVNRelease
|


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 () | |
Definition at line 67 of file SQLStore.php.
| Auth_OpenID_SQLStore::_add_nonce | ( | $ | server_url, |
| $ | timestamp, | ||
| $ | salt | ||
| ) |
private
Reimplemented in Auth_OpenID_SQLiteStore.
Definition at line 466 of file SQLStore.php.
References isError(), and resultToBool().
Referenced by useNonce().
| Auth_OpenID_SQLStore::_fixSQL | ( | ) |
private
Definition at line 251 of file SQLStore.php.
References $value.
Referenced by Auth_OpenID_SQLStore().
| Auth_OpenID_SQLStore::_get_assoc | ( | $ | server_url, |
| $ | handle | ||
| ) |
private
Definition at line 366 of file SQLStore.php.
References isError().
Referenced by Auth_OpenID_PostgreSQLStore\_set_assoc(), getAssociation(), and removeAssociation().
| Auth_OpenID_SQLStore::_get_assocs | ( | $ | server_url | ) |
private
Definition at line 380 of file SQLStore.php.
References isError().
Referenced by getAssociation().
| 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 498 of file SQLStore.php.
References Auth_OpenID\bytes().
Referenced by Auth_OpenID_PostgreSQLStore\blobEncode().
| Auth_OpenID_SQLStore::_set_assoc | ( | $ | server_url, |
| $ | handle, | ||
| $ | secret, | ||
| $ | issued, | ||
| $ | lifetime, | ||
| $ | assoc_type | ||
| ) |
private
Reimplemented in Auth_OpenID_PostgreSQLStore.
Definition at line 333 of file SQLStore.php.
Referenced by storeAssociation().
| Auth_OpenID_SQLStore::_unoctify | ( | $ | str | ) |
"Unoctifies" octal-escaped data from PostgreSQL and returns the resulting ASCII (possibly binary) string.
private
Definition at line 520 of file SQLStore.php.
Referenced by Auth_OpenID_PostgreSQLStore\blobDecode().
| Auth_OpenID_SQLStore::_verifySQL | ( | ) |
| 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.
| connection | $connection | This 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_table,: | This is an optional parameter to specify the name of the table used for storing associations. The default value is 'oid_associations'. | |
| nonces_table,: | This is an optional parameter to specify the name of the table used for storing nonces. The default value is 'oid_nonces'. |
Definition at line 88 of file SQLStore.php.
References $__Auth_OpenID_PEAR_AVAILABLE, _fixSQL(), _verifySQL(), and setSQL().
| Auth_OpenID_SQLStore::blobDecode | ( | $ | blob | ) |
Reimplemented in Auth_OpenID_PostgreSQLStore.
Definition at line 288 of file SQLStore.php.
Referenced by getAssociation().
| Auth_OpenID_SQLStore::blobEncode | ( | $ | str | ) |
Reimplemented in Auth_OpenID_PostgreSQLStore, and Auth_OpenID_MySQLStore.
Definition at line 293 of file SQLStore.php.
| Auth_OpenID_SQLStore::cleanupAssociations | ( | ) |
Reimplemented from Auth_OpenID_OpenIDStore.
Definition at line 559 of file SQLStore.php.
| Auth_OpenID_SQLStore::cleanupNonces | ( | ) |
Reimplemented from Auth_OpenID_OpenIDStore.
Definition at line 548 of file SQLStore.php.
References $Auth_OpenID_SKEW.
| Auth_OpenID_SQLStore::create_assoc_table | ( | ) |
Definition at line 321 of file SQLStore.php.
References resultToBool(), and tableExists().
Referenced by createTables().
| Auth_OpenID_SQLStore::create_nonce_table | ( | ) |
Definition at line 312 of file SQLStore.php.
References resultToBool(), and tableExists().
Referenced by createTables().
| Auth_OpenID_SQLStore::createTables | ( | ) |
Definition at line 298 of file SQLStore.php.
References create_assoc_table(), and create_nonce_table().
| Auth_OpenID_SQLStore::getAssociation | ( | $ | server_url, |
| $ | handle = 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.
This method is allowed (and encouraged) to garbage collect expired associations when found. This method must not return expired associations.
| string | $server_url | The URL of the identity server to get the association for. Because of the way the server portion of the library uses this interface, don't assume there are any limitations on the character set of the input string. In particular, expect to see unescaped non-url-safe characters in the server_url field. |
| mixed | $handle | This optional parameter is the handle of the specific association to get. If no specific handle is provided, any valid association matching the server URL is returned. |
Reimplemented from Auth_OpenID_OpenIDStore.
Definition at line 409 of file SQLStore.php.
References _get_assoc(), _get_assocs(), blobDecode(), and removeAssociation().
| Auth_OpenID_SQLStore::isError | ( | $ | value | ) |
Returns true if $value constitutes a database error; returns false otherwise.
Definition at line 179 of file SQLStore.php.
References $value.
Referenced by _add_nonce(), _get_assoc(), _get_assocs(), resultToBool(), and tableExists().
| Auth_OpenID_SQLStore::removeAssociation | ( | $ | server_url, |
| $ | handle | ||
| ) |
This method removes the matching association if it's found, and returns whether the association was removed or not.
| string | $server_url | The URL of the identity server the association to remove belongs to. Because of the way the server portion of the library uses this interface, don't assume there are any limitations on the character set of the input string. In particular, expect to see unescaped non-url-safe characters in the server_url field. |
| string | $handle | This is the handle of the association to remove. If there isn't an association found that matches both the given URL and handle, then there was no matching handle found. |
Reimplemented from Auth_OpenID_OpenIDStore.
Definition at line 392 of file SQLStore.php.
References _get_assoc(), and resultToBool().
Referenced by getAssociation().
| Auth_OpenID_SQLStore::reset | ( | ) |
Resets the store by removing all records from the store's tables.
Reimplemented from Auth_OpenID_OpenIDStore.
Definition at line 211 of file SQLStore.php.
| 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 189 of file SQLStore.php.
References isError().
Referenced by _add_nonce(), create_assoc_table(), create_nonce_table(), removeAssociation(), and storeAssociation().
| 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.
Reimplemented in Auth_OpenID_MySQLStore, Auth_OpenID_PostgreSQLStore, and Auth_OpenID_SQLiteStore.
Definition at line 203 of file SQLStore.php.
Referenced by Auth_OpenID_SQLStore().
| Auth_OpenID_SQLStore::storeAssociation | ( | $ | server_url, |
| $ | association | ||
| ) |
This method puts an Association object into storage, retrievable by server URL and handle.
| string | $server_url | The URL of the identity server that this association is with. Because of the way the server portion of the library uses this interface, don't assume there are any limitations on the character set of the input string. In particular, expect to see unescaped non-url-safe characters in the server_url field. |
| Association | $association | The Association to store. |
Reimplemented from Auth_OpenID_OpenIDStore.
Definition at line 346 of file SQLStore.php.
References _set_assoc(), and resultToBool().
| Auth_OpenID_SQLStore::tableExists | ( | $ | table_name | ) |
Definition at line 167 of file SQLStore.php.
References isError().
Referenced by create_assoc_table(), and create_nonce_table().
| Auth_OpenID_SQLStore::useNonce | ( | $ | server_url, |
| $ | timestamp, | ||
| $ | salt | ||
| ) |
Called when using a nonce.
This method should return C{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 C{False}.
Change: In earlier versions, round-trip nonces were used and a nonce was only valid if it had been previously stored with storeNonce. Version 2.0 uses one-way nonces, requiring a different implementation here that does not depend on a storeNonce call. (storeNonce is no longer part of the interface.
| string | $nonce | The nonce to use. |
Reimplemented from Auth_OpenID_OpenIDStore.
Definition at line 480 of file SQLStore.php.
References $Auth_OpenID_SKEW, and _add_nonce().
1.7.5.1