-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
feat (2fa): Add IStatelessProvider interface #57216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -629,6 +629,7 @@ | |
| - zorn-v <[email protected]> | ||
| - zulan <[email protected]> | ||
| - Łukasz Buśko <[email protected]> | ||
| - Michał Roszak <[email protected]> | ||
| - Nextcloud GmbH | ||
| - ownCloud GmbH | ||
| - ownCloud, Inc. | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
| @@ -0,0 +1,21 @@ | ||||
| <?php | ||||
|
|
||||
| declare(strict_types=1); | ||||
|
|
||||
| /** | ||||
| * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors | ||||
| * SPDX-License-Identifier: AGPL-3.0-only | ||||
| */ | ||||
|
|
||||
| namespace OCP\Authentication\TwoFactorAuth; | ||||
|
|
||||
| use OCP\IUser; | ||||
|
|
||||
| /** | ||||
| * Marks the 2FA provider stateless. That means the state of 2FA activation | ||||
| * for user will be checked dynamically and not stored in the database. | ||||
| */ | ||||
| interface IStatelessProvider extends IProvider { | ||||
|
Check failure on line 18 in lib/public/Authentication/TwoFactorAuth/IStatelessProvider.php
|
||||
|
|
||||
| public function isTwoFactorAuthEnabledForUser(IUser $user): bool; | ||||
|
||||
| public function isTwoFactorAuthEnabledForUser(IUser $user): bool; |
Doesn't add anything sine this method is from the parent interface
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True. I added it, because i was concerned it may get removed from the IProvider interface in the future, since the DocBlock of the OC\Authentication\TwoFactorAuth\Manager::fixMissingProviderStates method says "todo: remove in Nextcloud 17 as by then all providers should have been updated" and it is the only usage of isTwoFactorAuthEnabledForUser method.
Anyway, i'm going to remove it from my interface, since there is no need for that at the moment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.