android-key.php
1 day ago
android-safety-net.php
1 day ago
apple.php
1 day ago
format-base.php
1 day ago
index.php
1 day ago
none.php
1 day ago
packed.php
1 day ago
tpm.php
1 day ago
u2f.php
1 day ago
none.php
73 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Passkeys formatters |
| 4 | * |
| 5 | * @package wp-2fa |
| 6 | * @since 3.0.0 |
| 7 | * @copyright 2026 Melapress |
| 8 | * @license https://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 |
| 9 | * @link https://wordpress.org/plugins/wp-2fa/ |
| 10 | */ |
| 11 | |
| 12 | namespace WP2FA\Passkeys\Format; |
| 13 | |
| 14 | use WP2FA\Admin\Methods\passkeys\Authenticator_Data; |
| 15 | |
| 16 | /** |
| 17 | * Responsible for default format |
| 18 | * |
| 19 | * @since 3.0.0 |
| 20 | */ |
| 21 | class None extends Format_Base { |
| 22 | |
| 23 | /** |
| 24 | * Default constructor |
| 25 | * |
| 26 | * @param Array $attestion_object - Default comment. |
| 27 | * @param Authenticator_Data $authenticator_data - Default comment. |
| 28 | * |
| 29 | * @since 3.1.0 |
| 30 | */ |
| 31 | public function __construct( $attestion_object, Authenticator_Data $authenticator_data ) { |
| 32 | parent::__construct( $attestion_object, $authenticator_data ); |
| 33 | } |
| 34 | |
| 35 | /** |
| 36 | * Returns the key certificate in PEM format |
| 37 | * |
| 38 | * @return null |
| 39 | * |
| 40 | * @since 3.1.0 |
| 41 | */ |
| 42 | public function get_certificate_pem() { |
| 43 | return null; |
| 44 | } |
| 45 | |
| 46 | /** |
| 47 | * Validate attestation |
| 48 | * |
| 49 | * @param string $client_data_hash - The client hash. |
| 50 | * |
| 51 | * @return boolean |
| 52 | * |
| 53 | * @since 3.1.0 |
| 54 | */ |
| 55 | public function validate_attestation( $client_data_hash ) { |
| 56 | return true; |
| 57 | } |
| 58 | |
| 59 | /** |
| 60 | * Validates the certificate against root certificates. |
| 61 | * Format 'none' does not contain any ca, so always false. |
| 62 | * |
| 63 | * @param array $root_cas - The root cas. |
| 64 | * |
| 65 | * @return boolean |
| 66 | * |
| 67 | * @since 3.1.0 |
| 68 | */ |
| 69 | public function validate_root_certificate( $root_cas ) { |
| 70 | return false; |
| 71 | } |
| 72 | } |
| 73 |