summaryrefslogtreecommitdiffstats
path: root/php/Attic/examples/sample-sp/logout.php
diff options
context:
space:
mode:
authorChristophe Nowicki <cnowicki@easter-eggs.com>2004-08-18 15:03:56 +0000
committerChristophe Nowicki <cnowicki@easter-eggs.com>2004-08-18 15:03:56 +0000
commit131a818d244eea55a4e038c654c72ceee0a17526 (patch)
tree3a11a9fa8260bd3a1b0f1d46b15373fe4160f0c2 /php/Attic/examples/sample-sp/logout.php
parent712ff1a9f7f68c8ade853f3ae031666a63120fa8 (diff)
Service Provider written in PHP (login is working and logout will work soon ;0)
Diffstat (limited to 'php/Attic/examples/sample-sp/logout.php')
-rw-r--r--php/Attic/examples/sample-sp/logout.php45
1 files changed, 45 insertions, 0 deletions
diff --git a/php/Attic/examples/sample-sp/logout.php b/php/Attic/examples/sample-sp/logout.php
new file mode 100644
index 00000000..1d4ab750
--- /dev/null
+++ b/php/Attic/examples/sample-sp/logout.php
@@ -0,0 +1,45 @@
+<?php
+/*
+ * Service Provider Example -- AssertionConsumer
+ *
+ * Copyright (C) 2004 Entr'ouvert
+ * http://lasso.entrouvert.org
+ *
+ * Authors: Christophe Nowicki <cnowicki@easter-eggs.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+ include "config.php.inc";
+
+ session_start();
+
+ if (!isset($_SESSION["nameidentifier"])) {
+ print "User is not logged in";
+ exit(0);
+ }
+
+ lasso_init();
+
+ $server_dump = file_get_contents($server_dump_filename);
+
+ $server = lasso_server_new_from_dump($server_dump);
+
+ $logout = lasso_logout_new($server, lassoProviderTypeSp);
+
+ // $profile = lasso_cast_to_profile($logout);
+
+ lasso_shutdown();
+?>