summaryrefslogtreecommitdiffstats
path: root/lib/private/Authentication/Token/IProvider.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Authentication/Token/IProvider.php')
-rw-r--r--lib/private/Authentication/Token/IProvider.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/private/Authentication/Token/IProvider.php b/lib/private/Authentication/Token/IProvider.php
index 9b9048b1635..5215b61613e 100644
--- a/lib/private/Authentication/Token/IProvider.php
+++ b/lib/private/Authentication/Token/IProvider.php
@@ -145,4 +145,14 @@ interface IProvider {
* @throws InvalidTokenException
*/
public function setPassword(IToken $token, string $tokenId, string $password);
+
+ /**
+ * Rotate the token. Usefull for for example oauth tokens
+ *
+ * @param IToken $token
+ * @param string $oldTokenId
+ * @param string $newTokenId
+ * @return IToken
+ */
+ public function rotate(IToken $token, string $oldTokenId, string $newTokenId): IToken;
}