Skip to content

Commit e5dec7e

Browse files
pass idp to sls
Signed-off-by: Maxence Lange <[email protected]>
1 parent fb8af2a commit e5dec7e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/Controller/MasterController.php

+4-3
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,16 @@ public function __construct(
7979
*/
8080
public function autoLogout(?string $jwt) {
8181
try {
82-
if ($jwt !== null && $this->master->isValidJwt($jwt)) {
82+
if ($jwt !== null) {
8383
$key = $this->gss->getJwtKey();
8484
$decoded = (array)JWT::decode($jwt, new Key($key, Application::JWT_ALGORITHM));
85-
8685
$idp = $decoded['saml.idp'] ?? null;
86+
8787
$logoutUrl = $this->urlGenerator->linkToRoute('user_saml.SAML.singleLogoutService');
88-
if (!empty($logoutUrl) && $idp !== null) {
88+
if (!empty($logoutUrl)) {
8989
$token = [
9090
'logout' => 'logout',
91+
'idp' => $idp,
9192
'exp' => time() + 300, // expires after 5 minutes
9293
];
9394

0 commit comments

Comments
 (0)