From 8a215c492913d6d329a7b64229738d028c7489de Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Thu, 10 Oct 2024 15:20:34 +0200 Subject: [webinterface] Add simple API to remotely supply a certificate --- modules-available/webinterface/inc/webinterface.inc.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'modules-available/webinterface/inc') diff --git a/modules-available/webinterface/inc/webinterface.inc.php b/modules-available/webinterface/inc/webinterface.inc.php index 276110eb..20be6545 100644 --- a/modules-available/webinterface/inc/webinterface.inc.php +++ b/modules-available/webinterface/inc/webinterface.inc.php @@ -110,4 +110,17 @@ class WebInterface return $task['id'] ?? null; } + public static function getApiKey(): ?string + { + $key = Property::get(self::PROP_API_KEY, null); + if (empty($key)) + return null; + return $key; + } + + public static function setApiKey(?string $key): void + { + Property::set(self::PROP_API_KEY, empty($key) ? null : $key); + } + } \ No newline at end of file -- cgit v1.2.3-55-g7522