Skip to content

Commit acde2b9

Browse files
stweildemiankatz
andauthored
Fix OpenIDConnect (replace deprecated logout by getLogoutRedirectUrl) (#5018)
- Also includes fix to related whitespace problem in Auth Manager error message. Signed-off-by: Stefan Weil <[email protected]> Co-authored-by: Demian Katz <[email protected]>
1 parent f9bac11 commit acde2b9

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

module/VuFind/src/VuFind/Auth/Manager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ protected function getAuth(?string $name = null): AuthInterface
174174
// need to be replaced by "getLogoutRedirectUrl" and "clearLoginState".
175175
if (is_callable([$this->auth[$name], 'logout']) || is_callable([$this->auth[$name], 'resetState'])) {
176176
throw new \Exception(
177-
'Deprecated methods "logout" and "resetState" need'
177+
'Deprecated methods "logout" and "resetState" need '
178178
. 'to be replaced by "getLogoutRedirectUrl" and "clearLoginState"'
179179
);
180180
}

module/VuFind/src/VuFind/Auth/OpenIDConnect.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -365,13 +365,13 @@ public function getSessionInitiator(string $target): ?string
365365
}
366366

367367
/**
368-
* Perform cleanup at logout time.
368+
* Get URL users should be redirected to for logout in external services if necessary.
369369
*
370-
* @param string $url URL to redirect user to after logging out.
370+
* @param string $url Internal URL to redirect user to after logging out.
371371
*
372-
* @return string Redirect URL (modified for OpenIDConnect logout).
372+
* @return string Redirect URL (usually same as $url, but modified in some authentication modules).
373373
*/
374-
public function logout($url)
374+
public function getLogoutRedirectUrl(string $url): string
375375
{
376376
$redirectUrl = $url;
377377
$endSessionEndpoint = false;

0 commit comments

Comments
 (0)