forked from hms-dbmi/i2b2v2-webclient
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsaml-acs.php
33 lines (26 loc) · 846 Bytes
/
saml-acs.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
session_start();
$_SESSION["shib-session-id"] = filter_input(INPUT_SERVER, 'AJP_Shib-Session-ID', FILTER_UNSAFE_RAW);
$_SESSION["eppn"] = filter_input(INPUT_SERVER, 'AJP_eduPersonPrincipalName', FILTER_UNSAFE_RAW);
$error_msg;
if (isset($_SESSION['error_msg'])) {
$error_msg = $_SESSION['error_msg'];
unset($_SESSION['error_msg']);
}
$success_msg;
if (isset($_SESSION['success_msg'])) {
$success_msg = $_SESSION['success_msg'];
unset($_SESSION['success_msg']);
}
?>
<html>
<body>
<?php
if (empty($_SESSION["shib-session-id"])) {
?><h1>Error: The Shibbolith session ID is missing!</h1><?php
} else {
?><script type="text/javascript">window.opener.i2b2.PM.ctrlr.SamlLogin("<?php echo $_SESSION["eppn"]; ?>", "<?php echo $_SESSION["shib-session-id"]; ?>", true);</script><?php
}
?>
</body>
</html>