Skip to content

Commit b83ecf1

Browse files
committed
feat: Expose JWT key
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
1 parent c9353fd commit b83ecf1

3 files changed

Lines changed: 26 additions & 0 deletions

File tree

lib/private/GlobalScale/Config.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,8 @@ public function isPrimaryAdmin(string $userId): bool {
5555
return in_array($userId, $this->config->getSystemValue('gss.master.admin', []))
5656
|| in_array($userId, $this->config->getSystemValue('gss.primary.admin', []));
5757
}
58+
59+
public function getJWTKey(): string {
60+
return $this->config->getSystemValueString('gss.jwt.key', '');
61+
}
5862
}

lib/public/GlobalScale/IConfig.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,11 @@ public function isSecondary(): bool;
6060
* @since 35.0.0
6161
*/
6262
public function isPrimaryAdmin(string $userId): bool;
63+
64+
/**
65+
* Get the JWT key used to communicate between the primary and the secondary instances.
66+
*
67+
* @since 35.0.0
68+
*/
69+
public function getJWTKey(): string;
6370
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
/**
6+
* SPDX-FileCopyrightText: 2025 Nextcloud GmbH
7+
* SPDX-FileContributor: Carl Schwan
8+
* SPDX-License-Identifier: AGPL-3.0-or-later
9+
*/
10+
11+
namespace OCP\GlobalScale;
12+
13+
class IGlobalScaleService {
14+
15+
}

0 commit comments

Comments
 (0)