| 1 |
<?php |
| 2 |
/* |
| 3 |
Example logout page for mod_auth_pubtkt |
| 4 |
(https://neon1.net/mod_auth_pubtkt) |
| 5 |
|
| 6 |
written by Manuel Kasper <[email protected]> |
| 7 |
*/ |
| 8 |
|
| 9 |
$domain = ".example.com"; |
| 10 |
|
| 11 |
if ($_POST['logout']) { |
| 12 |
/* only do this if there really has been a POST; otherwise we could |
| 13 |
be fooled by pre-caching browsers etc. */ |
| 14 |
setcookie("auth_pubtkt", "", time() - 86400, "/", $domain, true); |
| 15 |
} else { |
| 16 |
header("Location: login.php"); |
| 17 |
exit; |
| 18 |
} |
| 19 |
|
| 20 |
?> |
| 21 |
<html> |
| 22 |
<head> |
| 23 |
<title>mod_auth_pubtkt Single Sign-On</title> |
| 24 |
<link rel="stylesheet" type="text/css" href="style.css"> |
| 25 |
</head> |
| 26 |
|
| 27 |
<body> |
| 28 |
|
| 29 |
<table width="100%" height="100%"> |
| 30 |
<tr><td align="center" valign="middle"> |
| 31 |
|
| 32 |
<img src="logo.gif"> |
| 33 |
<h2>Single Sign-On</h2> |
| 34 |
|
| 35 |
<p>You are now logged out.</p> |
| 36 |
|
| 37 |
</tr></td> |
| 38 |
</table> |
| 39 |
|
| 40 |
</body> |
| 41 |
</html> |