aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/Authentication/TwoFactorAuth
diff options
context:
space:
mode:
Diffstat (limited to 'lib/public/Authentication/TwoFactorAuth')
-rw-r--r--lib/public/Authentication/TwoFactorAuth/ILoginSetupProvider.php7
-rw-r--r--lib/public/Authentication/TwoFactorAuth/IPersonalProviderSettings.php8
-rw-r--r--lib/public/Authentication/TwoFactorAuth/IProvider.php8
-rw-r--r--lib/public/Authentication/TwoFactorAuth/IRegistry.php2
-rw-r--r--lib/public/Authentication/TwoFactorAuth/TwoFactorProviderChallengeFailed.php3
-rw-r--r--lib/public/Authentication/TwoFactorAuth/TwoFactorProviderChallengePassed.php3
6 files changed, 15 insertions, 16 deletions
diff --git a/lib/public/Authentication/TwoFactorAuth/ILoginSetupProvider.php b/lib/public/Authentication/TwoFactorAuth/ILoginSetupProvider.php
index 84b0a9066f2..32ede4f385c 100644
--- a/lib/public/Authentication/TwoFactorAuth/ILoginSetupProvider.php
+++ b/lib/public/Authentication/TwoFactorAuth/ILoginSetupProvider.php
@@ -8,16 +8,15 @@ declare(strict_types=1);
*/
namespace OCP\Authentication\TwoFactorAuth;
-use OCP\Template;
+use OCP\Template\ITemplate;
/**
* @since 17.0.0
*/
interface ILoginSetupProvider {
/**
- * @return Template
- *
* @since 17.0.0
+ * @since 32.0.0 Broader return type ITemplate instead of \OCP\Template
*/
- public function getBody(): Template;
+ public function getBody(): ITemplate;
}
diff --git a/lib/public/Authentication/TwoFactorAuth/IPersonalProviderSettings.php b/lib/public/Authentication/TwoFactorAuth/IPersonalProviderSettings.php
index 610f299c526..3cf7946272e 100644
--- a/lib/public/Authentication/TwoFactorAuth/IPersonalProviderSettings.php
+++ b/lib/public/Authentication/TwoFactorAuth/IPersonalProviderSettings.php
@@ -6,9 +6,10 @@ declare(strict_types=1);
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
+
namespace OCP\Authentication\TwoFactorAuth;
-use OCP\Template;
+use OCP\Template\ITemplate;
/**
* Interface IPersonalProviderSettings
@@ -17,9 +18,8 @@ use OCP\Template;
*/
interface IPersonalProviderSettings {
/**
- * @return Template
- *
* @since 15.0.0
+ * @since 32.0.0 Broader return type ITemplate instead of \OCP\Template
*/
- public function getBody(): Template;
+ public function getBody(): ITemplate;
}
diff --git a/lib/public/Authentication/TwoFactorAuth/IProvider.php b/lib/public/Authentication/TwoFactorAuth/IProvider.php
index f1dd24ff0a2..27c4121f4ac 100644
--- a/lib/public/Authentication/TwoFactorAuth/IProvider.php
+++ b/lib/public/Authentication/TwoFactorAuth/IProvider.php
@@ -9,7 +9,7 @@ declare(strict_types=1);
namespace OCP\Authentication\TwoFactorAuth;
use OCP\IUser;
-use OCP\Template;
+use OCP\Template\ITemplate;
/**
* @since 9.1.0
@@ -50,11 +50,9 @@ interface IProvider {
* Get the template for rending the 2FA provider view
*
* @since 9.1.0
- *
- * @param IUser $user
- * @return Template
+ * @since 32.0.0 Broader return type ITemplate instead of \OCP\Template.
*/
- public function getTemplate(IUser $user): Template;
+ public function getTemplate(IUser $user): ITemplate;
/**
* Verify the given challenge
diff --git a/lib/public/Authentication/TwoFactorAuth/IRegistry.php b/lib/public/Authentication/TwoFactorAuth/IRegistry.php
index f4cffd7c34c..6817f1763cf 100644
--- a/lib/public/Authentication/TwoFactorAuth/IRegistry.php
+++ b/lib/public/Authentication/TwoFactorAuth/IRegistry.php
@@ -38,7 +38,7 @@ interface IRegistry {
*
* @since 14.0.0
* @return array<string, bool> where the array key is the provider ID (string) and the
- * value is the enabled state (bool)
+ * value is the enabled state (bool)
*/
public function getProviderStates(IUser $user): array;
diff --git a/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderChallengeFailed.php b/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderChallengeFailed.php
index 15e5ed92509..42ca855df35 100644
--- a/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderChallengeFailed.php
+++ b/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderChallengeFailed.php
@@ -20,7 +20,8 @@ class TwoFactorProviderChallengeFailed extends Event {
*/
public function __construct(
private IUser $user,
- private IProvider $provider) {
+ private IProvider $provider,
+ ) {
parent::__construct();
}
diff --git a/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderChallengePassed.php b/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderChallengePassed.php
index 2dc91a98880..396fbf9e9a5 100644
--- a/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderChallengePassed.php
+++ b/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderChallengePassed.php
@@ -20,7 +20,8 @@ class TwoFactorProviderChallengePassed extends Event {
*/
public function __construct(
private IUser $user,
- private IProvider $provider) {
+ private IProvider $provider,
+ ) {
parent::__construct();
}