File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ <h2 id="saml-metadata">SAML Metadata</h2>
3232 < h2 id ="simplesamlphp "> SimpleSAMLphp</ h2 >
3333 < ul >
3434 < li > < a href ="https://ssp.dev.openconext.local/simplesaml/admin "> SimpleSAMLphp installation page (password: < code > secret</ code > )</ a > </ li >
35+ < li > < a href ="logout.php "> End IdP SSP session (remove SimpleSAMLAuthToken cookie)</ a > </ li >
3536 </ ul >
3637
3738 < h2 id ="test-accounts "> Test accounts</ h2 >
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ const SSP_AUTH_COOKIE_NAME = 'SimpleSAMLAuthToken ' ;
4+
5+ $ cookie_was_set = false ;
6+
7+ // Check if cookie is set
8+ if (isset ($ _COOKIE [SSP_AUTH_COOKIE_NAME ])) {
9+ $ cookie_was_set = true ;
10+ // Send cookie header to unset cookie
11+ setcookie (SSP_AUTH_COOKIE_NAME , '' , time () - 3600 ); // Expire cookie
12+ }
13+
14+ $ message = '' ;
15+ if ($ cookie_was_set ) {
16+ $ message = 'Deleted ' . SSP_AUTH_COOKIE_NAME . ' cookie. ' ;
17+ } else {
18+ $ message = SSP_AUTH_COOKIE_NAME . ' was not present. ' ;
19+ }
20+
21+ $ message = htmlspecialchars ($ message , ENT_QUOTES , 'UTF-8 ' );
22+
23+ echo <<<HTML
24+ <html lang="en">
25+ <body>
26+ <p> $ message</p>
27+ <p>
28+ <a href="/">Home</a>
29+ </p>
30+ </body>
31+ </html>
32+ HTML ;
You can’t perform that action at this time.
0 commit comments