aboutsummaryrefslogtreecommitdiffstats
path: root/lib/unstable
diff options
context:
space:
mode:
authorMaxence Lange <maxence@artificial-owl.com>2024-12-05 14:50:50 -0100
committerMaxence Lange <maxence@artificial-owl.com>2024-12-05 14:51:04 -0100
commitac470184e77692c1f7abf0c83b155db18f5a843c (patch)
tree801532309a7ad4ad25eb88cdea297107a86fe2b9 /lib/unstable
parenta6e8d41c256093574006ce277af306bbe474da6d (diff)
downloadnextcloud-server-ac470184e77692c1f7abf0c83b155db18f5a843c.tar.gz
nextcloud-server-ac470184e77692c1f7abf0c83b155db18f5a843c.zip
fix(ocm): get details from sharedSecret from provider
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Diffstat (limited to 'lib/unstable')
-rw-r--r--lib/unstable/Federation/ISignedCloudFederationProvider.php33
1 files changed, 33 insertions, 0 deletions
diff --git a/lib/unstable/Federation/ISignedCloudFederationProvider.php b/lib/unstable/Federation/ISignedCloudFederationProvider.php
new file mode 100644
index 00000000000..1ec50f606ae
--- /dev/null
+++ b/lib/unstable/Federation/ISignedCloudFederationProvider.php
@@ -0,0 +1,33 @@
+<?php
+
+declare(strict_types=1);
+/**
+ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
+
+namespace NCU\Federation;
+
+use OCP\Federation\ICloudFederationProvider;
+
+/**
+ * Interface ICloudFederationProvider
+ *
+ * Enable apps to create their own cloud federation provider
+ *
+ * @experimental 31.0.0
+ */
+interface ISignedCloudFederationProvider extends ICloudFederationProvider {
+
+ /**
+ * returns federationId in direct relation (as recipient or as author) of a sharedSecret
+ * the federationId must be the one at the remote end
+ *
+ * @param string $sharedSecret
+ * @param array $payload
+ *
+ * @experimental 31.0.0
+ * @return string
+ */
+ public function getFederationIdFromSharedSecret(string $sharedSecret, array $payload): string;
+}