summaryrefslogtreecommitdiffstats
path: root/lib/private/Authentication/Token/IProvider.php
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2016-09-06 21:41:15 +0200
committerLukas Reschke <lukas@statuscode.ch>2016-11-02 13:39:16 +0100
commitd907666232468503ab6ed2bdac44b6500be2beb6 (patch)
tree945f83d4ddeda3df811042b138e84a2cdf06d120 /lib/private/Authentication/Token/IProvider.php
parentdada3ffb51ce9d941b15f1e3fdc1ce292acebb69 (diff)
downloadnextcloud-server-d907666232468503ab6ed2bdac44b6500be2beb6.tar.gz
nextcloud-server-d907666232468503ab6ed2bdac44b6500be2beb6.zip
bring back remember-me
* try to reuse the old session token for remember me login * decrypt/encrypt token password and set the session id accordingly * create remember-me cookies only if checkbox is checked and 2fa solved * adjust db token cleanup to store remembered tokens longer * adjust unit tests Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/private/Authentication/Token/IProvider.php')
-rw-r--r--lib/private/Authentication/Token/IProvider.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/private/Authentication/Token/IProvider.php b/lib/private/Authentication/Token/IProvider.php
index 65b515960ea..b8c15571df1 100644
--- a/lib/private/Authentication/Token/IProvider.php
+++ b/lib/private/Authentication/Token/IProvider.php
@@ -28,6 +28,7 @@ use OCP\IUser;
interface IProvider {
+
/**
* Create and persist a new token
*
@@ -37,9 +38,10 @@ interface IProvider {
* @param string|null $password
* @param string $name
* @param int $type token type
+ * @param int $remember whether the session token should be used for remember-me
* @return IToken
*/
- public function generateToken($token, $uid, $loginName, $password, $name, $type = IToken::TEMPORARY_TOKEN);
+ public function generateToken($token, $uid, $loginName, $password, $name, $type = IToken::TEMPORARY_TOKEN, $remember = IToken::DO_NOT_REMEMBER);
/**
* Get a token by token id
@@ -51,6 +53,12 @@ interface IProvider {
public function getToken($tokenId) ;
/**
+ * @param string $oldSessionId
+ * @param string $sessionId
+ */
+ public function renewSessionToken($oldSessionId, $sessionId);
+
+ /**
* Invalidate (delete) the given session token
*
* @param string $token