summaryrefslogtreecommitdiffstats
path: root/Auth/OpenID/PostgreSQLStore.php
diff options
context:
space:
mode:
Diffstat (limited to 'Auth/OpenID/PostgreSQLStore.php')
-rw-r--r--Auth/OpenID/PostgreSQLStore.php23
1 files changed, 2 insertions, 21 deletions
diff --git a/Auth/OpenID/PostgreSQLStore.php b/Auth/OpenID/PostgreSQLStore.php
index a415280..a5baef1 100644
--- a/Auth/OpenID/PostgreSQLStore.php
+++ b/Auth/OpenID/PostgreSQLStore.php
@@ -23,8 +23,8 @@ class Auth_OpenID_PostgreSQLStore extends Auth_OpenID_SQLStore {
function setSQL()
{
$this->sql['nonce_table'] =
- "CREATE TABLE %s (nonce CHAR(8) UNIQUE PRIMARY KEY, ".
- "expires INTEGER)";
+ "CREATE TABLE %s (server_url VARCHAR(2047), timestamp INTEGER, ".
+ "salt CHAR(40), UNIQUE (server_url, timestamp, salt)";
$this->sql['assoc_table'] =
"CREATE TABLE %s (server_url VARCHAR(2047), handle VARCHAR(255), ".
@@ -74,9 +74,6 @@ class Auth_OpenID_PostgreSQLStore extends Auth_OpenID_SQLStore {
$this->sql['get_nonce'] =
"SELECT * FROM %s WHERE nonce = ?";
-
- $this->sql['remove_nonce'] =
- "DELETE FROM %s WHERE nonce = ?";
}
/**
@@ -103,22 +100,6 @@ class Auth_OpenID_PostgreSQLStore extends Auth_OpenID_SQLStore {
/**
* @access private
*/
- function _add_nonce($nonce, $expires)
- {
- if ($this->_get_nonce($nonce)) {
- return $this->resultToBool($this->connection->query(
- $this->sql['add_nonce']['update_nonce'],
- array($expires, $nonce)));
- } else {
- return $this->resultToBool($this->connection->query(
- $this->sql['add_nonce']['insert_nonce'],
- array($nonce, $expires)));
- }
- }
-
- /**
- * @access private
- */
function blobEncode($blob)
{
return $this->_octify($blob);