summaryrefslogtreecommitdiffstats
path: root/php/Attic/examples/sample-sp/index.php
diff options
context:
space:
mode:
authorChristophe Nowicki <cnowicki@easter-eggs.com>2004-09-23 16:00:54 +0000
committerChristophe Nowicki <cnowicki@easter-eggs.com>2004-09-23 16:00:54 +0000
commitf94170a65c5585a2c955d14360becd3e2ca98ac2 (patch)
tree925f029ba25f31676fa92ca40113660c6423c5b5 /php/Attic/examples/sample-sp/index.php
parent662764422bbf1b01decc01d414a7ab9d0db63958 (diff)
downloadlasso-f94170a65c5585a2c955d14360becd3e2ca98ac2.tar.gz
lasso-f94170a65c5585a2c955d14360becd3e2ca98ac2.tar.xz
lasso-f94170a65c5585a2c955d14360becd3e2ca98ac2.zip
Group misc functions into misc.php on the idp and sp
Add Federation Terminaison metadata on the idp and sp Add view off federation on the sp Add cancel federation button on the sp and idp Defederation is not working yet
Diffstat (limited to 'php/Attic/examples/sample-sp/index.php')
-rw-r--r--php/Attic/examples/sample-sp/index.php47
1 files changed, 44 insertions, 3 deletions
diff --git a/php/Attic/examples/sample-sp/index.php b/php/Attic/examples/sample-sp/index.php
index 62c5faef..43948017 100644
--- a/php/Attic/examples/sample-sp/index.php
+++ b/php/Attic/examples/sample-sp/index.php
@@ -64,7 +64,11 @@ You can get more informations about <b>Lasso</b> at <br>
session_start();
+
lasso_init();
+
+ $server_dump = file_get_contents($config['server_dump_filename']);
+ $server = LassoServer::newFromDump($server_dump);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
@@ -104,11 +108,48 @@ You can get more informations about <b>Lasso</b> at <br>
<td><?php echo $config['providerID']; ?></td>
<td><a href="login.php?profile=post">post</a> | <a href="login.php?profile=artifact">artifact</a></td>
</tr>
-<?php } else { ?>
+<?php } else {
+ // User is federated with an Service Provider
+ if (isset($_SESSION['identity_dump']))
+ {
+ $login = new LassoLogin($server);
+ $login->setIdentityFromDump($_SESSION['identity_dump']);
+ if (!empty($_SESSION['session_dump']))
+ $login->setSessionFromDump($_SESSION['session_dump']);
+ $identity = $login->identity;
+ $providerIDs = $identity->providerIds;
+
+ if ($providerIDs->length())
+ {
+?>
<tr>
- <td colspan="2">Single Logout</td>
+ <td align='center' colspan='2'>Cancel a Federation with :</td>
+</tr>
+<tr>
+ <td align='center'>Identity Provider</td><td align='center'>Profile</td>
+</tr>
+<?php
+ for($i = 0; $i < $providerIDs->length() ; $i++)
+ {
+ $providerID = $providerIDs->getItem($i);
+?>
+<tr>
+ <td align='center'><?php echo $providerID; ?></td>
+ <td align='center'>
+ <a href="cancel_federation.php?profile=redirect&with=<?php echo $providerID; ?>">Redirect</a> |
+ <a href="cancel_federation.php?profile=soap&with=<?php echo $providerID; ?>">SOAP</a>
+ </td>
+</tr>
+<tr>
+ <td colspan='2'>&nbsp;</td>
+</tr>
+<?php
+ }
+ }
+ }
+?>
<tr>
- <td colspan="2"><a href="logout.php">Logout!</a></td>
+ <td>Single Logout using </td><td><a href="logout.php?profile=soap">SOAP</a></td>
</tr>
<?php } ?>
</table>