rescuepayloadstorage
2 weeks ago
MfaBackupCodes.php
2 weeks ago
MfaBackupCodesInterface.php
2 weeks ago
MfaEndpoint.php
2 weeks ago
MfaEndpointInterface.php
2 weeks ago
MfaManager.php
2 weeks ago
MfaSettings.php
2 weeks ago
MfaSettingsInterface.php
2 weeks ago
MfaValidator.php
2 weeks ago
RescueCode.php
2 weeks ago
MfaSettingsInterface.php
46 lines
| 1 | <?php |
| 2 | |
| 3 | namespace LLAR\Core\Mfa; |
| 4 | |
| 5 | if ( ! defined( 'ABSPATH' ) ) { |
| 6 | exit; |
| 7 | } |
| 8 | |
| 9 | /** |
| 10 | * Interface for MFA settings service. |
| 11 | * View data, cleanup, temporarily disabled state, roles data. |
| 12 | * |
| 13 | * Used for testability: MfaManager can depend on this interface. |
| 14 | */ |
| 15 | interface MfaSettingsInterface { |
| 16 | |
| 17 | /** |
| 18 | * Whether MFA is temporarily disabled (rescue flow). |
| 19 | * |
| 20 | * @return bool True if temporarily disabled. |
| 21 | */ |
| 22 | public function is_mfa_temporarily_disabled(); |
| 23 | |
| 24 | /** |
| 25 | * Cleanup rescue codes and MFA transients when MFA is disabled. |
| 26 | * |
| 27 | * @return void |
| 28 | */ |
| 29 | public function cleanup_rescue_codes(); |
| 30 | |
| 31 | /** |
| 32 | * Prepare roles for MFA tab. |
| 33 | * |
| 34 | * @return array Keys: prepared_roles, editable_roles. |
| 35 | */ |
| 36 | public function prepare_roles_data(); |
| 37 | |
| 38 | /** |
| 39 | * MFA settings for view. Single source; uses MfaValidator for block reason. |
| 40 | * |
| 41 | * @param bool $show_rescue_popup From form submit when popup should open. |
| 42 | * @return array mfa_enabled, mfa_temporarily_disabled, mfa_roles, prepared_roles, editable_roles, show_rescue_popup, mfa_block_reason, mfa_block_message. |
| 43 | */ |
| 44 | public function get_settings_for_view( $show_rescue_popup = false ); |
| 45 | } |
| 46 |