You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
<?php
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
require '_common.php';
|
|
|
|
|
|
|
|
use authkit2\Authkit2;
|
|
|
|
|
|
|
|
// Initialize the three-legged oauth flow
|
|
|
|
$flow = new \authkit2\Oidc\Flows\UserFlow(Authkit2::get_client());
|
|
|
|
|
|
|
|
// Log the user out locally
|
|
|
|
unset($_SESSION['access_token'], $_SESSION['refresh_token']);
|
|
|
|
|
|
|
|
// Redirect them to the openid provider to log them out
|
|
|
|
$redirect_url = $flow->getLogoutUrl(OPENID_REDIRECT_URL);
|
|
|
|
header('Location: '.$redirect_url);
|