diff options
author | tailor <cygnus@janrain.com> | 2007-09-25 19:25:31 +0000 |
---|---|---|
committer | tailor <cygnus@janrain.com> | 2007-09-25 19:25:31 +0000 |
commit | c44ad60d75db1747bf8bd7bb9d46d91ea723956e (patch) | |
tree | fd62546c6b6c30d6622bc0735cb3b9313e293789 | |
parent | f4f7744cae65f182fe9d3814d2e3af20407b1555 (diff) | |
download | php-openid-c44ad60d75db1747bf8bd7bb9d46d91ea723956e.zip php-openid-c44ad60d75db1747bf8bd7bb9d46d91ea723956e.tar.gz php-openid-c44ad60d75db1747bf8bd7bb9d46d91ea723956e.tar.bz2 |
[project @ Remove getExpired()]
-rw-r--r-- | Auth/OpenID/FileStore.php | 12 | ||||
-rw-r--r-- | Auth/OpenID/Interface.php | 9 | ||||
-rw-r--r-- | Auth/OpenID/MySQLStore.php | 3 | ||||
-rw-r--r-- | Auth/OpenID/PostgreSQLStore.php | 3 | ||||
-rw-r--r-- | Auth/OpenID/SQLStore.php | 18 | ||||
-rw-r--r-- | Auth/OpenID/SQLiteStore.php | 3 |
6 files changed, 1 insertions, 47 deletions
diff --git a/Auth/OpenID/FileStore.php b/Auth/OpenID/FileStore.php index a00c43f..7f96ca3 100644 --- a/Auth/OpenID/FileStore.php +++ b/Auth/OpenID/FileStore.php @@ -463,18 +463,6 @@ class Auth_OpenID_FileStore extends Auth_OpenID_OpenIDStore { } } - function getExpired() - { - $urls = array(); - foreach ($this->_allAssocs() as $pair) { - list($_, $assoc) = $pair; - if ($assoc->getExpiresIn() <= 0) { - $urls[] = $assoc->server_url; - } - } - return $urls; - } - /** * @access private */ diff --git a/Auth/OpenID/Interface.php b/Auth/OpenID/Interface.php index c7bbe14..eeb130a 100644 --- a/Auth/OpenID/Interface.php +++ b/Auth/OpenID/Interface.php @@ -179,15 +179,6 @@ class Auth_OpenID_OpenIDStore { } /** - * Return all server URLs that have expired associations. - */ - function getExpired() - { - trigger_error("Auth_OpenID_OpenIDStore::getExpired ". - "not implemented", E_USER_ERROR); - } - - /** * Removes all entries from the store; implementation is optional. */ function reset() diff --git a/Auth/OpenID/MySQLStore.php b/Auth/OpenID/MySQLStore.php index 30e1f59..f8dc9ae 100644 --- a/Auth/OpenID/MySQLStore.php +++ b/Auth/OpenID/MySQLStore.php @@ -58,9 +58,6 @@ class Auth_OpenID_MySQLStore extends Auth_OpenID_SQLStore { $this->sql['add_nonce'] = "INSERT INTO %s (server_url, timestamp, salt) VALUES (?, ?, ?)"; - $this->sql['get_expired'] = - "SELECT server_url FROM %s WHERE issued + lifetime < ?"; - $this->sql['clean_nonce'] = "DELETE FROM %s WHERE timestamp < ?"; diff --git a/Auth/OpenID/PostgreSQLStore.php b/Auth/OpenID/PostgreSQLStore.php index 15c69ce..c7d19f3 100644 --- a/Auth/OpenID/PostgreSQLStore.php +++ b/Auth/OpenID/PostgreSQLStore.php @@ -54,9 +54,6 @@ class Auth_OpenID_PostgreSQLStore extends Auth_OpenID_SQLStore { $this->sql['remove_assoc'] = "DELETE FROM %s WHERE server_url = ? AND handle = ?"; - $this->sql['get_expired'] = - "SELECT server_url FROM %s WHERE issued + lifetime < ?"; - $this->sql['add_nonce'] = "INSERT INTO %s (server_url, timestamp, salt) VALUES ". "(?, ?, ?)" diff --git a/Auth/OpenID/SQLStore.php b/Auth/OpenID/SQLStore.php index 2fae5d3..b4c822b 100644 --- a/Auth/OpenID/SQLStore.php +++ b/Auth/OpenID/SQLStore.php @@ -231,8 +231,7 @@ class Auth_OpenID_SQLStore extends Auth_OpenID_OpenIDStore { 'set_assoc', 'get_assoc', 'get_assocs', - 'remove_assoc', - 'get_expired', + 'remove_assoc' ); foreach ($required_sql_keys as $key) { @@ -265,7 +264,6 @@ class Auth_OpenID_SQLStore extends Auth_OpenID_OpenIDStore { 'get_assoc', 'get_assocs', 'remove_assoc', - 'get_expired', 'clean_assoc') ) ); @@ -408,20 +406,6 @@ class Auth_OpenID_SQLStore extends Auth_OpenID_OpenIDStore { return true; } - function getExpired() - { - $sql = $this->sql['get_expired']; - $result = $this->connection->getAll($sql, array(time())); - - $expired = array(); - - foreach ($result as $row) { - $expired[] = $row['server_url']; - } - - return $expired; - } - function getAssociation($server_url, $handle = null) { if ($handle !== null) { diff --git a/Auth/OpenID/SQLiteStore.php b/Auth/OpenID/SQLiteStore.php index b5fd48d..ec2bf58 100644 --- a/Auth/OpenID/SQLiteStore.php +++ b/Auth/OpenID/SQLiteStore.php @@ -35,9 +35,6 @@ class Auth_OpenID_SQLiteStore extends Auth_OpenID_SQLStore { "SELECT handle, secret, issued, lifetime, assoc_type FROM %s ". "WHERE server_url = ?"; - $this->sql['get_expired'] = - "SELECT server_url FROM %s WHERE issued + lifetime < ?"; - $this->sql['get_assoc'] = "SELECT handle, secret, issued, lifetime, assoc_type FROM %s ". "WHERE server_url = ? AND handle = ?"; |