Auth_OpenID_PostgreSQLStore Klassenreferenz

Abgeleitet von Auth_OpenID_SQLStore.

Zusammengehörigkeiten von Auth_OpenID_PostgreSQLStore:

Collaboration graph
[Legende]

Öffentliche Methoden

 setSQL ()
 _set_assoc ($server_url, $handle, $secret, $issued, $lifetime, $assoc_type)
 blobEncode ($blob)
 blobDecode ($blob)

Ausführliche Beschreibung

Definiert in Zeile 19 der Datei PostgreSQLStore.php.


Dokumentation der Elementfunktionen

_set_assoc ( server_url,
handle,
secret,
issued,
lifetime,
assoc_type 
)

private

Erneute Implementation von Auth_OpenID_SQLStore.

Definiert in Zeile 78 der Datei PostgreSQLStore.php.

00080     {
00081         $result = $this->_get_assoc($server_url, $handle);
00082         if ($result) {
00083             // Update the table since this associations already exists.
00084             $this->connection->query($this->sql['set_assoc']['update_assoc'],
00085                                      array($secret, $issued, $lifetime,
00086                                            $assoc_type, $server_url, $handle));
00087         } else {
00088             // Insert a new record because this association wasn't
00089             // found.
00090             $this->connection->query($this->sql['set_assoc']['insert_assoc'],
00091                                      array($server_url, $handle, $secret,
00092                                            $issued, $lifetime, $assoc_type));
00093         }
00094     }

blobDecode ( blob  ) 

private

Erneute Implementation von Auth_OpenID_SQLStore.

Definiert in Zeile 107 der Datei PostgreSQLStore.php.

00108     {
00109         return $this->_unoctify($blob);
00110     }

blobEncode ( blob  ) 

private

Erneute Implementation von Auth_OpenID_SQLStore.

Definiert in Zeile 99 der Datei PostgreSQLStore.php.

00100     {
00101         return $this->_octify($blob);
00102     }

setSQL (  ) 

private

Erneute Implementation von Auth_OpenID_SQLStore.

Definiert in Zeile 23 der Datei PostgreSQLStore.php.

00024     {
00025         $this->sql['nonce_table'] =
00026             "CREATE TABLE %s (server_url VARCHAR(2047) NOT NULL, ".
00027                              "timestamp INTEGER NOT NULL, ".
00028                              "salt CHAR(40) NOT NULL, ".
00029                 "UNIQUE (server_url, timestamp, salt))";
00030 
00031         $this->sql['assoc_table'] =
00032             "CREATE TABLE %s (server_url VARCHAR(2047) NOT NULL, ". 
00033                              "handle VARCHAR(255) NOT NULL, ".
00034                              "secret BYTEA NOT NULL, ".
00035                              "issued INTEGER NOT NULL, ".
00036                              "lifetime INTEGER NOT NULL, ".
00037                              "assoc_type VARCHAR(64) NOT NULL, ".
00038             "PRIMARY KEY (server_url, handle), ".
00039             "CONSTRAINT secret_length_constraint CHECK ".
00040             "(LENGTH(secret) <= 128))";
00041 
00042         $this->sql['set_assoc'] =
00043             array(
00044                   'insert_assoc' => "INSERT INTO %s (server_url, handle, ".
00045                   "secret, issued, lifetime, assoc_type) VALUES ".
00046                   "(?, ?, '!', ?, ?, ?)",
00047                   'update_assoc' => "UPDATE %s SET secret = '!', issued = ?, ".
00048                   "lifetime = ?, assoc_type = ? WHERE server_url = ? AND ".
00049                   "handle = ?"
00050                   );
00051 
00052         $this->sql['get_assocs'] =
00053             "SELECT handle, secret, issued, lifetime, assoc_type FROM %s ".
00054             "WHERE server_url = ?";
00055 
00056         $this->sql['get_assoc'] =
00057             "SELECT handle, secret, issued, lifetime, assoc_type FROM %s ".
00058             "WHERE server_url = ? AND handle = ?";
00059 
00060         $this->sql['remove_assoc'] =
00061             "DELETE FROM %s WHERE server_url = ? AND handle = ?";
00062 
00063         $this->sql['add_nonce'] =
00064                   "INSERT INTO %s (server_url, timestamp, salt) VALUES ".
00065                   "(?, ?, ?)"
00066                   ;
00067 
00068         $this->sql['clean_nonce'] =
00069             "DELETE FROM %s WHERE timestamp < ?";
00070 
00071         $this->sql['clean_assoc'] =
00072             "DELETE FROM %s WHERE issued + lifetime < ?";
00073     }


Die Dokumentation für diese Klasse wurde erzeugt aufgrund der Datei:
Copyright © 2003 - 2009 MyOOS [Shopsystem]. All rights reserved.
MyOOS [Shopsystem] is Free Software released under the GNU/GPL License.

Webmaster: info@r23.de (Impressum)
doxygen