summaryrefslogtreecommitdiffstats
path: root/lib/private/Authentication/Token/IProvider.php
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@owncloud.com>2016-05-18 11:33:56 +0200
committerChristoph Wurst <christoph@owncloud.com>2016-05-18 18:25:37 +0200
commit062657873911bd1c1c633a5b4944ebc6f4781ea8 (patch)
treee92d6db32caf0265f8085e62aee2037d016da425 /lib/private/Authentication/Token/IProvider.php
parentdc0e3617dc1c5a3d4c4fbc67e6bae957e5afff8e (diff)
downloadnextcloud-server-062657873911bd1c1c633a5b4944ebc6f4781ea8.tar.gz
nextcloud-server-062657873911bd1c1c633a5b4944ebc6f4781ea8.zip
add method to query all user auth tokens
Diffstat (limited to 'lib/private/Authentication/Token/IProvider.php')
-rw-r--r--lib/private/Authentication/Token/IProvider.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/private/Authentication/Token/IProvider.php b/lib/private/Authentication/Token/IProvider.php
index 1fd3a70fbbf..a5c5faa5639 100644
--- a/lib/private/Authentication/Token/IProvider.php
+++ b/lib/private/Authentication/Token/IProvider.php
@@ -23,6 +23,7 @@
namespace OC\Authentication\Token;
use OC\Authentication\Exceptions\InvalidTokenException;
+use OCP\IUser;
interface IProvider {
@@ -69,6 +70,17 @@ interface IProvider {
public function updateToken(IToken $token);
/**
+ * Get all token of a user
+ *
+ * The provider may limit the number of result rows in case of an abuse
+ * where a high number of (session) tokens is generated
+ *
+ * @param IUser $user
+ * @return IToken[]
+ */
+ public function getTokenByUser(IUser $user);
+
+ /**
* Get the (unencrypted) password of the given token
*
* @param IToken $token