summaryrefslogtreecommitdiffstats
path: root/php/Attic/examples/sample-sp/login.php
diff options
context:
space:
mode:
authorChristophe Nowicki <cnowicki@easter-eggs.com>2004-09-17 16:02:24 +0000
committerChristophe Nowicki <cnowicki@easter-eggs.com>2004-09-17 16:02:24 +0000
commit1db82e571dd29835ee669472de1a646314e12aa9 (patch)
treea5327193d410a974e21dc27e6554420c5bec8a1b /php/Attic/examples/sample-sp/login.php
parentcc5bffb4bd9a1f3f057be78bfcd71db51a74dfc8 (diff)
log viewer for the Service Provider and the Identity Provider
added logger for in many files updated idp1 metadata, added .php extension added session viewer for the sp (you will be able to view online users)
Diffstat (limited to 'php/Attic/examples/sample-sp/login.php')
-rw-r--r--php/Attic/examples/sample-sp/login.php40
1 files changed, 26 insertions, 14 deletions
diff --git a/php/Attic/examples/sample-sp/login.php b/php/Attic/examples/sample-sp/login.php
index 229aa28a..c857e5cd 100644
--- a/php/Attic/examples/sample-sp/login.php
+++ b/php/Attic/examples/sample-sp/login.php
@@ -1,6 +1,5 @@
<?php
/*
- *
* Service Provider Example -- Simple Sing On
*
* Copyright (C) 2004 Entr'ouvert
@@ -22,10 +21,14 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-
+
+ require_once 'Log.php';
+ require_once 'DB.php';
$config = unserialize(file_get_contents('config.inc'));
+ session_start();
+
lasso_init();
$server_dump = file_get_contents($config['server_dump_filename']);
@@ -34,20 +37,29 @@
$login = new LassoLogin($server);
- $login->initauthnrequest(lassoHttpMethodRedirect);
-
- $request = $login->authnRequest;
+ switch($_GET['profile'])
+ {
+ case 'post':
+ // TODO
+ break;
+ case 'artifact':
+ $login->initauthnrequest(lassoHttpMethodRedirect);
+
+ $request = $login->authnRequest;
- $request->isPassive = FALSE;
- $request->nameIdPolicy = lassoLibNameIDPolicyTypeFederated;
- $request->consent = lassoLibConsentObtained;
+ $request->isPassive = FALSE;
+ $request->nameIdPolicy = lassoLibNameIDPolicyTypeFederated;
+ $request->consent = lassoLibConsentObtained;
- $login->buildAuthnRequestMsg($config['providerID']);
+ $login->buildAuthnRequestMsg($config['providerID']);
- $url = $login->msgUrl;
+ $url = $login->msgUrl;
- header("Request-URI: $url");
- header("Content-Location: $url");
- header("Location: $url\r\n\r\n");
- exit();
+ header("Request-URI: $url");
+ header("Content-Location: $url");
+ header("Location: $url\r\n\r\n");
+ exit();
+ default:
+ die('Unknown single sign on profile');
+ }
?>