diff options
author | tailor <cygnus@janrain.com> | 2006-08-25 22:36:31 +0000 |
---|---|---|
committer | tailor <cygnus@janrain.com> | 2006-08-25 22:36:31 +0000 |
commit | c5e1f65fbeaaac13e1b25a166df7b23a2061adb0 (patch) | |
tree | 8e06a1591a46274d798c6a12f5aef0a257ff39c7 /Auth/OpenID/PostgreSQLStore.php | |
parent | 6459176ec9a2c94996fbe14a7428643c7b52e163 (diff) | |
download | php-openid-c5e1f65fbeaaac13e1b25a166df7b23a2061adb0.zip php-openid-c5e1f65fbeaaac13e1b25a166df7b23a2061adb0.tar.gz php-openid-c5e1f65fbeaaac13e1b25a166df7b23a2061adb0.tar.bz2 |
[project @ Server-generated and one-way nonces patch from python openid]
Diffstat (limited to 'Auth/OpenID/PostgreSQLStore.php')
-rw-r--r-- | Auth/OpenID/PostgreSQLStore.php | 23 |
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); |