aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Authentication
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Authentication')
-rw-r--r--lib/private/Authentication/Exceptions/ExpiredTokenException.php13
-rw-r--r--lib/private/Authentication/Exceptions/WipeTokenException.php13
2 files changed, 26 insertions, 0 deletions
diff --git a/lib/private/Authentication/Exceptions/ExpiredTokenException.php b/lib/private/Authentication/Exceptions/ExpiredTokenException.php
index c23a1176fae..18618a557f3 100644
--- a/lib/private/Authentication/Exceptions/ExpiredTokenException.php
+++ b/lib/private/Authentication/Exceptions/ExpiredTokenException.php
@@ -25,8 +25,21 @@ declare(strict_types=1);
*/
namespace OC\Authentication\Exceptions;
+use OC\Authentication\Token\IToken;
+
/**
* @deprecated 28.0.0 use OCP version instead
*/
class ExpiredTokenException extends \OCP\Authentication\Exceptions\ExpiredTokenException {
+ public function __construct(
+ IToken $token,
+ ) {
+ parent::__construct($token);
+ }
+
+ public function getToken(): IToken {
+ $token = parent::getToken();
+ /** @var IToken $token We know that we passed OC interface from constructor */
+ return $token;
+ }
}
diff --git a/lib/private/Authentication/Exceptions/WipeTokenException.php b/lib/private/Authentication/Exceptions/WipeTokenException.php
index 8ae4f74e4d7..9b24ca24430 100644
--- a/lib/private/Authentication/Exceptions/WipeTokenException.php
+++ b/lib/private/Authentication/Exceptions/WipeTokenException.php
@@ -25,8 +25,21 @@ declare(strict_types=1);
*/
namespace OC\Authentication\Exceptions;
+use OC\Authentication\Token\IToken;
+
/**
* @deprecated 28.0.0 use OCP version instead
*/
class WipeTokenException extends \OCP\Authentication\Exceptions\WipeTokenException {
+ public function __construct(
+ IToken $token,
+ ) {
+ parent::__construct($token);
+ }
+
+ public function getToken(): IToken {
+ $token = parent::getToken();
+ /** @var IToken $token We know that we passed OC interface from constructor */
+ return $token;
+ }
}