summaryrefslogtreecommitdiffstats
path: root/lib/public
diff options
context:
space:
mode:
authorArtur Neumann <artur@jankaritech.com>2022-11-21 17:28:21 +0545
committerCôme Chilliet <come.chilliet@nextcloud.com>2023-03-14 17:13:29 +0100
commitf634badf1218baff90acde501859081e3765d79f (patch)
treeb38c95825cc82e6497da36e742952fecc8452ae0 /lib/public
parent21be557e2afe9e3a1e024d9618a377816d73d63a (diff)
downloadnextcloud-server-f634badf1218baff90acde501859081e3765d79f.tar.gz
nextcloud-server-f634badf1218baff90acde501859081e3765d79f.zip
public interface to invalidate tokens of user
Signed-off-by: Artur Neumann <artur@jankaritech.com>
Diffstat (limited to 'lib/public')
-rw-r--r--lib/public/Authentication/Token/IProvider.php37
1 files changed, 37 insertions, 0 deletions
diff --git a/lib/public/Authentication/Token/IProvider.php b/lib/public/Authentication/Token/IProvider.php
new file mode 100644
index 00000000000..9000868907e
--- /dev/null
+++ b/lib/public/Authentication/Token/IProvider.php
@@ -0,0 +1,37 @@
+<?php
+
+declare(strict_types=1);
+
+/**
+ * @copyright Copyright (c) 2022 Artur Neumann <artur@jankaritech.com>
+ *
+ * @author Artur Neumann <artur@jankaritech.com>
+ *
+ * @license AGPL-3.0
+ *
+ * This code is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License, version 3,
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License, version 3,
+ * along with this program. If not, see <http://www.gnu.org/licenses/>
+ *
+ */
+namespace OCP\Authentication\Token;
+
+interface IProvider {
+ /**
+ * invalidates all tokens of a specific user
+ * if a client name is given only tokens of that client will be invalidated
+ *
+ * @param string $uid
+ * @param string|null $clientName
+ * @return void
+ */
+ public function invalidateTokensOfUser(string $uid, ?string $clientName);
+}