class-jetpack-force-2fa.php
2 years ago
class.jetpack-sso-helpers.php
2 years ago
class.jetpack-sso-notices.php
2 years ago
class.jetpack-sso-user-admin.php
2 years ago
jetpack-sso-admin-create-user-rtl.css
2 years ago
jetpack-sso-admin-create-user-rtl.min.css
2 years ago
jetpack-sso-admin-create-user.css
2 years ago
jetpack-sso-admin-create-user.js
2 years ago
jetpack-sso-admin-create-user.min.css
2 years ago
jetpack-sso-login-rtl.css
4 years ago
jetpack-sso-login-rtl.min.css
4 years ago
jetpack-sso-login.css
4 years ago
jetpack-sso-login.js
2 years ago
jetpack-sso-login.min.css
4 years ago
jetpack-sso-users.js
2 years ago
class-jetpack-force-2fa.php
71 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Force Jetpack 2FA Functionality |
| 4 | * |
| 5 | * Ported from original repo at https://github.com/automattic/jetpack-force-2fa |
| 6 | * |
| 7 | * @deprecated 13.5 Use Automattic\Jetpack\Connection\Manager\SSO instead. |
| 8 | * |
| 9 | * phpcs:disable VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable |
| 10 | * |
| 11 | * @package automattic/jetpack |
| 12 | */ |
| 13 | |
| 14 | /** |
| 15 | * Force users to use two factor authentication. |
| 16 | * |
| 17 | * @deprecated 13.5 |
| 18 | */ |
| 19 | class Jetpack_Force_2FA { |
| 20 | |
| 21 | /** |
| 22 | * The role to force 2FA for. |
| 23 | * |
| 24 | * Defaults to manage_options via the plugins_loaded function. |
| 25 | * Can be modified with the jetpack_force_2fa_cap filter. |
| 26 | * |
| 27 | * @deprecated 13.5 |
| 28 | * |
| 29 | * @var string |
| 30 | */ |
| 31 | private $role; |
| 32 | |
| 33 | /** |
| 34 | * Constructor. |
| 35 | * |
| 36 | * @deprecated 13.5 |
| 37 | */ |
| 38 | public function __construct() { |
| 39 | _deprecated_function( __METHOD__, 'jetpack-13.5', 'Automattic\\Jetpack\\Connection\\Manager\\SSO\\Force_2FA::__construct' ); |
| 40 | } |
| 41 | |
| 42 | /** |
| 43 | * Load the plugin via the plugins_loaded hook. |
| 44 | * |
| 45 | * @deprecated 13.5 |
| 46 | */ |
| 47 | public function plugins_loaded() { |
| 48 | _deprecated_function( __METHOD__, 'jetpack-13.5', 'Automattic\\Jetpack\\Connection\\Manager\\SSO\\Force_2FA::plugins_loaded' ); |
| 49 | } |
| 50 | |
| 51 | /** |
| 52 | * Display an admin notice if Jetpack SSO is not active. |
| 53 | * |
| 54 | * @deprecated 13.5 |
| 55 | */ |
| 56 | public function admin_notice() { |
| 57 | _deprecated_function( __METHOD__, 'jetpack-13.5', 'Automattic\\Jetpack\\Connection\\Manager\\SSO\\Force_2FA::admin_notice' ); |
| 58 | } |
| 59 | |
| 60 | /** |
| 61 | * Specifically set the two step filter for Jetpack SSO. |
| 62 | * |
| 63 | * @deprecated 13.5 |
| 64 | * |
| 65 | * @param Object $user_data The user data from WordPress.com. |
| 66 | */ |
| 67 | public function jetpack_set_two_step( $user_data ) { |
| 68 | _deprecated_function( __METHOD__, 'jetpack-13.5', 'Automattic\\Jetpack\\Connection\\Manager\\SSO\\Force_2FA::jetpack_set_two_step' ); |
| 69 | } |
| 70 | } |
| 71 |