diff options
| author | Christophe Nowicki <cnowicki@easter-eggs.com> | 2004-09-20 16:01:08 +0000 |
|---|---|---|
| committer | Christophe Nowicki <cnowicki@easter-eggs.com> | 2004-09-20 16:01:08 +0000 |
| commit | 63eda2109992301e9e033f66c5d6f4912b1d56f5 (patch) | |
| tree | bbb39e8845160a1d3047af1ea058467def2dc4e7 /php/Attic/examples/sample-idp/setup.php | |
| parent | 4909ede99e0a938abdbb27305989f61938783c23 (diff) | |
PHP session are now stored in the database
A now table was added 'sso_session' for storing information about the
PHP Session, it's possible to view logged user
Logout destroy the PHP session in the IdP
Bug : user can't sso twice ;(
Diffstat (limited to 'php/Attic/examples/sample-idp/setup.php')
| -rw-r--r-- | php/Attic/examples/sample-idp/setup.php | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/php/Attic/examples/sample-idp/setup.php b/php/Attic/examples/sample-idp/setup.php index eaa9fa88..5284f886 100644 --- a/php/Attic/examples/sample-idp/setup.php +++ b/php/Attic/examples/sample-idp/setup.php @@ -287,8 +287,23 @@ $query = "CREATE TABLE sessions ( id varchar(32) primary key, - expiry integer, - data text + lastupdate timestamp, + data text)"; + + $res =& $db->query($query); + if (DB::isError($res)) + die($res->getMessage()); + + print "OK"; + + print "<br>Create table 'sso_sessions' : "; + $query = "DROP TABLE sso_sessions CASCADE"; + $res =& $db->query($query); + + $query = "CREATE TABLE sso_sessions ( + name_identifier character varying(100), + session_id character varying(32), + ip integer )"; $res =& $db->query($query); @@ -300,7 +315,6 @@ $db->disconnect(); // Check if IdP files does exists - $keys = array_keys($config); $files = preg_grep("/idp/", $keys); @@ -551,7 +565,8 @@ <input type='submit' name='setup' value='setup'> </p> </form> -<br> +<p align='center'><a href='index.php'>Index</a> +</p> <p>Copyright © 2004 Entr'ouvert</p> </body> </html> |
