diff options
| author | Christophe Nowicki <cnowicki@easter-eggs.com> | 2004-09-22 13:53:06 +0000 |
|---|---|---|
| committer | Christophe Nowicki <cnowicki@easter-eggs.com> | 2004-09-22 13:53:06 +0000 |
| commit | ef60f5149bb71419e8c405c7ed763cfb74127709 (patch) | |
| tree | 69c89b5493a30d2d2ef8fe4b20addf9fc196d128 | |
| parent | 979e3affa3f021dc046b752da27ae6c6f8b7f97d (diff) | |
| download | lasso-ef60f5149bb71419e8c405c7ed763cfb74127709.tar.gz lasso-ef60f5149bb71419e8c405c7ed763cfb74127709.tar.xz lasso-ef60f5149bb71419e8c405c7ed763cfb74127709.zip | |
Added ProfileBrwsPost
| -rw-r--r-- | php/Attic/examples/sample-sp/login.php | 54 |
1 files changed, 36 insertions, 18 deletions
diff --git a/php/Attic/examples/sample-sp/login.php b/php/Attic/examples/sample-sp/login.php index 55e55d5e..7b693c56 100644 --- a/php/Attic/examples/sample-sp/login.php +++ b/php/Attic/examples/sample-sp/login.php @@ -47,29 +47,47 @@ $login = new LassoLogin($server); - switch($_GET['profile']) - { - case 'post': - // TODO - break; - case 'artifact': - $login->initauthnrequest(lassoHttpMethodRedirect); - - $request = $login->authnRequest; - - $request->isPassive = FALSE; - $request->nameIdPolicy = lassoLibNameIDPolicyTypeFederated; - $request->consent = lassoLibConsentObtained; + if ($_GET['profile'] == 'post') + $login->initauthnrequest(lassoHttpMethodPost); + elseif ($_GET['profile'] == 'artifact') + $login->initauthnrequest(lassoHttpMethodRedirect); + else + die('Unknown Single Sign ON Profile'); - $login->buildAuthnRequestMsg($config['providerID']); + $request = $login->authnRequest; + $request->isPassive = FALSE; + $request->nameIdPolicy = lassoLibNameIDPolicyTypeFederated; + $request->consent = lassoLibConsentObtained; - $url = $login->msgUrl; + $login->buildAuthnRequestMsg($config['providerID']); + $url = $login->msgUrl; + $msg = $login->msgBody; + switch ($_GET['profile']) + { + case 'post': +?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <title>Authentication Request</title> + </head> + <body onLoad="document.forms[0].submit()"> + <form action="<?php echo $url; ?>" method="post"> + <p>You should be automaticaly redirected to an authentication server.</p> + <p>If this page is still visible after a few seconds, press the <em>Send</em> button below.</p> + <input type="hidden" name="LAREQ" value="<?php echo $msg; ?>" /> + <input type="submit" name="SendButton" value="Send" /> + </form> + </body> +</html> +<? + break; + case 'artifact' : header("Request-URI: $url"); header("Content-Location: $url"); header("Location: $url\r\n\r\n"); - exit(); - default: - die('Unknown single sign on profile'); + break; } ?> |
