summaryrefslogtreecommitdiffstats
path: root/php/Attic/examples/sample-sp/setup.php
diff options
context:
space:
mode:
authorChristophe Nowicki <cnowicki@easter-eggs.com>2004-09-20 16:01:08 +0000
committerChristophe Nowicki <cnowicki@easter-eggs.com>2004-09-20 16:01:08 +0000
commit63eda2109992301e9e033f66c5d6f4912b1d56f5 (patch)
treebbb39e8845160a1d3047af1ea058467def2dc4e7 /php/Attic/examples/sample-sp/setup.php
parent4909ede99e0a938abdbb27305989f61938783c23 (diff)
downloadlasso-63eda2109992301e9e033f66c5d6f4912b1d56f5.tar.gz
lasso-63eda2109992301e9e033f66c5d6f4912b1d56f5.tar.xz
lasso-63eda2109992301e9e033f66c5d6f4912b1d56f5.zip
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-sp/setup.php')
-rw-r--r--php/Attic/examples/sample-sp/setup.php22
1 files changed, 20 insertions, 2 deletions
diff --git a/php/Attic/examples/sample-sp/setup.php b/php/Attic/examples/sample-sp/setup.php
index c6c44228..2886c88a 100644
--- a/php/Attic/examples/sample-sp/setup.php
+++ b/php/Attic/examples/sample-sp/setup.php
@@ -167,8 +167,22 @@
$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)
)";
$res =& $db->query($query);
@@ -177,6 +191,7 @@
print "OK";
+
$db->disconnect();
$keys = array_keys($config);
@@ -375,6 +390,9 @@
</table>
<input type='hidden' name='action' value='setup'>
</form>
+<p align='center'><a href='index.php'>Index</a>
+</p>
+<p>Copyright &copy; 2004 Entr'ouvert</p>
</body>
</html>
<?php