Skip to content

Commit

Permalink
Fix signout
Browse files Browse the repository at this point in the history
That still doesn't work, due to this bug that nobody has acknowledged yet afer 2 weeks: wso2-extensions/identity-inbound-auth-oauth#1113
  • Loading branch information
lvps committed Jun 4, 2019
1 parent 76758d8 commit 0ea2b8e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Authentication.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ public static function signOut() {
}

$oidc = self::getOidc();
$at = $_SESSION['access_token'];
$token = $_SESSION['id_token'];
session_destroy();
$oidc->signOut($at, CRAUTO_URL . '/logout.php');
$oidc->signOut($token, CRAUTO_URL . '/logout.php');
exit();
}

Expand Down Expand Up @@ -165,9 +165,9 @@ private static function performRefresh(): bool {
throw new AuthenticationException('Fake implicit flow failed', 0, $e);
} finally {
unset($_SESSION['openid_connect_nonce']);
unset($_SESSION['openid_connect_state']);
unset($_REQUEST['access_token']);
unset($_REQUEST['id_token']);
unset($_SESSION['openid_connect_state']);
unset($_REQUEST['state']);
}

Expand Down Expand Up @@ -204,12 +204,12 @@ private static function setAttributes(OpenIDConnectClient $oidc) {
$cn = $oidc->requestUserInfo('name');
$exp = $oidc->getVerifiedClaims('exp');
$refresh_token = $oidc->getRefreshToken();
$access_token = $oidc->getAccessToken();
$id_token = $oidc->getIdToken();

$_SESSION['uid'] = $uid;
$_SESSION['cn'] = $cn;
$_SESSION['expires'] = $exp;
$_SESSION['refresh_token'] = $refresh_token;
$_SESSION['access_token'] = $access_token;
$_SESSION['id_token'] = $id_token;
}
}

0 comments on commit 0ea2b8e

Please sign in to comment.