summaryrefslogtreecommitdiffstats
path: root/lib/private/Authentication/Token/IToken.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Authentication/Token/IToken.php')
-rw-r--r--lib/private/Authentication/Token/IToken.php51
1 files changed, 43 insertions, 8 deletions
diff --git a/lib/private/Authentication/Token/IToken.php b/lib/private/Authentication/Token/IToken.php
index a24d31e2ed2..e122ec02764 100644
--- a/lib/private/Authentication/Token/IToken.php
+++ b/lib/private/Authentication/Token/IToken.php
@@ -1,4 +1,5 @@
<?php
+declare(strict_types=1);
/**
* @copyright Copyright (c) 2016, ownCloud, Inc.
*
@@ -37,26 +38,26 @@ interface IToken extends JsonSerializable {
*
* @return int
*/
- public function getId();
+ public function getId(): int;
/**
* Get the user UID
*
* @return string
*/
- public function getUID();
+ public function getUID(): string;
/**
* Get the login name used when generating the token
*
* @return string
*/
- public function getLoginName();
+ public function getLoginName(): string;
/**
* Get the (encrypted) login password
*
- * @return string
+ * @return string|null
*/
public function getPassword();
@@ -65,28 +66,28 @@ interface IToken extends JsonSerializable {
*
* @return int
*/
- public function getLastCheck();
+ public function getLastCheck(): int;
/**
* Set the timestamp of the last password check
*
* @param int $time
*/
- public function setLastCheck($time);
+ public function setLastCheck(int $time);
/**
* Get the authentication scope for this token
*
* @return string
*/
- public function getScope();
+ public function getScope(): string;
/**
* Get the authentication scope for this token
*
* @return array
*/
- public function getScopeAsArray();
+ public function getScopeAsArray(): array;
/**
* Set the authentication scope for this token
@@ -94,4 +95,38 @@ interface IToken extends JsonSerializable {
* @param array $scope
*/
public function setScope($scope);
+
+ /**
+ * Get the name of the token
+ * @return string
+ */
+ public function getName(): string;
+
+ /**
+ * Get the remember state of the token
+ *
+ * @return int
+ */
+ public function getRemember(): int;
+
+ /**
+ * Set the token
+ *
+ * @param string $token
+ */
+ public function setToken(string $token);
+
+ /**
+ * Set the password
+ *
+ * @param string $password
+ */
+ public function setPassword(string $password);
+
+ /**
+ * Set the expiration time of the token
+ *
+ * @param int|null $expires
+ */
+ public function setExpires($expires);
}