Skip to content

Commit

Permalink
add oidc logout
Browse files Browse the repository at this point in the history
  • Loading branch information
PandorasActorMS committed Sep 20, 2023
1 parent 8c6a5fa commit 3029499
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions logout.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<?php
session_start();
if(isset($_SESSION['oidc'])){
$oidc = $_SESSION['oidc'];
unset($_SESSION['oidc']);
$oidc -> sign_out($oidc->getIdToken(), "https://ai.lab.hm.edu/logout.php");
}

session_destroy();
header("Location: login.php");
exit;
Expand Down
2 changes: 2 additions & 0 deletions oic_login.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@

$_SESSION['username'] = $oidc->requestUserInfo('email');

$_SESSION['oidc'] = $oidc;


header("Location: interface.php");
exit();
Expand Down

0 comments on commit 3029499

Please sign in to comment.