Skip to content

Commit

Permalink
Merge pull request #127 from TheCrealm/master
Browse files Browse the repository at this point in the history
Changed signOut() Method parameter to prevent confusion
  • Loading branch information
azmeuk authored Nov 24, 2021
2 parents 11785b4 + f1dc330 commit 64add0a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
* Support for providers that has a different login URL from the issuer URL, for instance Azure Active Directory. Here, the provider URL is on the format: https://login.windows.net/(tenant-id), while the issuer claim actually is on the format: https://sts.windows.net/(tenant-id).

### Changed
* signOut() Method parameter $accessToken -> $idToken to prevent confusion about access and id tokens usage. #127
* refreshToken method update #124

### Removed
Expand Down
8 changes: 4 additions & 4 deletions src/OpenIDConnectClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -435,23 +435,23 @@ public function authenticate() {
* Connect provider that the end-user has logged out of the relying party site
* (the client application).
*
* @param string $accessToken ID token (obtained at login)
* @param string $idToken ID token (obtained at login)
* @param string|null $redirect URL to which the RP is requesting that the End-User's User Agent
* be redirected after a logout has been performed. The value MUST have been previously
* registered with the OP. Value can be null.
*
* @throws OpenIDConnectClientException
*/
public function signOut($accessToken, $redirect) {
public function signOut($idToken, $redirect) {
$signout_endpoint = $this->getProviderConfigValue('end_session_endpoint');

$signout_params = null;
if($redirect === null){
$signout_params = array('id_token_hint' => $accessToken);
$signout_params = array('id_token_hint' => $idToken);
}
else {
$signout_params = array(
'id_token_hint' => $accessToken,
'id_token_hint' => $idToken,
'post_logout_redirect_uri' => $redirect);
}

Expand Down

0 comments on commit 64add0a

Please sign in to comment.