diff options
Diffstat (limited to 'lib/public/Authentication/Exceptions')
5 files changed, 109 insertions, 0 deletions
diff --git a/lib/public/Authentication/Exceptions/CredentialsUnavailableException.php b/lib/public/Authentication/Exceptions/CredentialsUnavailableException.php new file mode 100644 index 00000000000..6ca8e68ed95 --- /dev/null +++ b/lib/public/Authentication/Exceptions/CredentialsUnavailableException.php @@ -0,0 +1,15 @@ +<?php + +/** + * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ +namespace OCP\Authentication\Exceptions; + +use Exception; + +/** + * @since 12 + */ +class CredentialsUnavailableException extends Exception { +} diff --git a/lib/public/Authentication/Exceptions/ExpiredTokenException.php b/lib/public/Authentication/Exceptions/ExpiredTokenException.php new file mode 100644 index 00000000000..27a5a2ad5ce --- /dev/null +++ b/lib/public/Authentication/Exceptions/ExpiredTokenException.php @@ -0,0 +1,31 @@ +<?php + +declare(strict_types=1); +/** + * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ +namespace OCP\Authentication\Exceptions; + +use OCP\Authentication\Token\IToken; + +/** + * @since 28.0.0 + */ +class ExpiredTokenException extends InvalidTokenException { + /** + * @since 28.0.0 + */ + public function __construct( + private IToken $token, + ) { + parent::__construct(); + } + + /** + * @since 28.0.0 + */ + public function getToken(): IToken { + return $this->token; + } +} diff --git a/lib/public/Authentication/Exceptions/InvalidTokenException.php b/lib/public/Authentication/Exceptions/InvalidTokenException.php new file mode 100644 index 00000000000..af2ddf04f9d --- /dev/null +++ b/lib/public/Authentication/Exceptions/InvalidTokenException.php @@ -0,0 +1,16 @@ +<?php + +declare(strict_types=1); +/** + * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ +namespace OCP\Authentication\Exceptions; + +use Exception; + +/** + * @since 28.0.0 + */ +class InvalidTokenException extends Exception { +} diff --git a/lib/public/Authentication/Exceptions/PasswordUnavailableException.php b/lib/public/Authentication/Exceptions/PasswordUnavailableException.php new file mode 100644 index 00000000000..89e254e8ba1 --- /dev/null +++ b/lib/public/Authentication/Exceptions/PasswordUnavailableException.php @@ -0,0 +1,15 @@ +<?php + +/** + * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ +namespace OCP\Authentication\Exceptions; + +use Exception; + +/** + * @since 12 + */ +class PasswordUnavailableException extends Exception { +} diff --git a/lib/public/Authentication/Exceptions/WipeTokenException.php b/lib/public/Authentication/Exceptions/WipeTokenException.php new file mode 100644 index 00000000000..9ae8d6dace3 --- /dev/null +++ b/lib/public/Authentication/Exceptions/WipeTokenException.php @@ -0,0 +1,32 @@ +<?php + +declare(strict_types=1); + +/** + * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ +namespace OCP\Authentication\Exceptions; + +use OCP\Authentication\Token\IToken; + +/** + * @since 28.0.0 + */ +class WipeTokenException extends InvalidTokenException { + /** + * @since 28.0.0 + */ + public function __construct( + private IToken $token, + ) { + parent::__construct(); + } + + /** + * @since 28.0.0 + */ + public function getToken(): IToken { + return $this->token; + } +} |