Skip to content

Commit ce49154

Browse files
Merge pull request #107 from nextcloud/backport/104/104-stable26-2
[stable26] pass idp to sls
2 parents c472d1a + bed96ec commit ce49154

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/Controller/MasterController.php

Lines changed: 4 additions & 3 deletions
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)