ILIAS  Release_4_1_x_branch Revision 61804
 All Data Structures Namespaces Files Functions Variables Groups Pages
Auth_OpenID_MySQLStore Class Reference
+ Inheritance diagram for Auth_OpenID_MySQLStore:
+ Collaboration diagram for Auth_OpenID_MySQLStore:

Public Member Functions

 setSQL ()
 private
 blobEncode ($blob)
 private
- Public Member Functions inherited from Auth_OpenID_SQLStore
 Auth_OpenID_SQLStore ($connection, $associations_table=null, $nonces_table=null)
 This creates a new SQLStore instance.
 tableExists ($table_name)
 isError ($value)
 Returns true if $value constitutes a database error; returns false otherwise.
 resultToBool ($obj)
 Converts a query result to a boolean.
 reset ()
 Resets the store by removing all records from the store's tables.
 _verifySQL ()
 private
 _fixSQL ()
 private
 blobDecode ($blob)
 createTables ()
 create_nonce_table ()
 create_assoc_table ()
 _set_assoc ($server_url, $handle, $secret, $issued, $lifetime, $assoc_type)
 private
 storeAssociation ($server_url, $association)
 This method puts an Association object into storage, retrievable by server URL and handle.
 _get_assoc ($server_url, $handle)
 private
 _get_assocs ($server_url)
 private
 removeAssociation ($server_url, $handle)
 This method removes the matching association if it's found, and returns whether the association was removed or not.
 getAssociation ($server_url, $handle=null)
 This method returns an Association object from storage that matches the server URL and, if specified, handle.
 _add_nonce ($server_url, $timestamp, $salt)
 private
 useNonce ($server_url, $timestamp, $salt)
 Called when using a nonce.
 _octify ($str)
 "Octifies" a binary string by returning a string with escaped octal bytes.
 _unoctify ($str)
 "Unoctifies" octal-escaped data from PostgreSQL and returns the resulting ASCII (possibly binary) string.
 cleanupNonces ()
 cleanupAssociations ()
- Public Member Functions inherited from Auth_OpenID_OpenIDStore
 cleanup ()
 supportsCleanup ()
 Report whether this storage supports cleanup.

Detailed Description

Definition at line 19 of file MySQLStore.php.

Member Function Documentation

Auth_OpenID_MySQLStore::blobEncode (   $blob)

private

Reimplemented from Auth_OpenID_SQLStore.

Definition at line 72 of file MySQLStore.php.

{
return "0x" . bin2hex($blob);
}
Auth_OpenID_MySQLStore::setSQL ( )

private

Reimplemented from Auth_OpenID_SQLStore.

Definition at line 23 of file MySQLStore.php.

{
$this->sql['nonce_table'] =
"CREATE TABLE %s (\n".
" server_url VARCHAR(2047) NOT NULL,\n".
" timestamp INTEGER NOT NULL,\n".
" salt CHAR(40) NOT NULL,\n".
" UNIQUE (server_url(255), timestamp, salt)\n".
") ENGINE=InnoDB";
$this->sql['assoc_table'] =
"CREATE TABLE %s (\n".
" server_url BLOB NOT NULL,\n".
" handle VARCHAR(255) NOT NULL,\n".
" secret BLOB NOT NULL,\n".
" issued INTEGER NOT NULL,\n".
" lifetime INTEGER NOT NULL,\n".
" assoc_type VARCHAR(64) NOT NULL,\n".
" PRIMARY KEY (server_url(255), handle)\n".
") ENGINE=InnoDB";
$this->sql['set_assoc'] =
"REPLACE INTO %s (server_url, handle, secret, issued,\n".
" lifetime, assoc_type) VALUES (?, ?, !, ?, ?, ?)";
$this->sql['get_assocs'] =
"SELECT handle, secret, issued, lifetime, assoc_type FROM %s ".
"WHERE server_url = ?";
$this->sql['get_assoc'] =
"SELECT handle, secret, issued, lifetime, assoc_type FROM %s ".
"WHERE server_url = ? AND handle = ?";
$this->sql['remove_assoc'] =
"DELETE FROM %s WHERE server_url = ? AND handle = ?";
$this->sql['add_nonce'] =
"INSERT INTO %s (server_url, timestamp, salt) VALUES (?, ?, ?)";
$this->sql['clean_nonce'] =
"DELETE FROM %s WHERE timestamp < ?";
$this->sql['clean_assoc'] =
"DELETE FROM %s WHERE issued + lifetime < ?";
}

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