assets
1 day ago
format
1 day ago
helpers
1 day ago
class-ajax-passkeys.php
1 day ago
class-api-register.php
1 day ago
class-api-signin.php
1 day ago
class-attestation-object.php
1 day ago
class-authenticate-server.php
1 day ago
class-authenticator-data.php
1 day ago
class-byte-buffer.php
1 day ago
class-chor-decoder.php
1 day ago
class-passkeys-endpoints.php
1 day ago
class-passkeys-user-profile.php
1 day ago
class-passkeys-wizard-steps.php
1 day ago
class-passkeys.php
1 day ago
class-pending-2fa-helper.php
1 day ago
class-source-repository.php
1 day ago
class-web-authn-exception.php
1 day ago
class-web-authn.php
1 day ago
index.php
1 day ago
class-web-authn-exception.php
61 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Responsible for the Passkeys extension plugin settings |
| 4 | * |
| 5 | * @package wp2fa |
| 6 | * @subpackage passkeys |
| 7 | * @since 3.0.0 |
| 8 | * @copyright 2026 Melapress |
| 9 | * @license https://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 |
| 10 | * @link https://wordpress.org/plugins/wp-2fa/ |
| 11 | */ |
| 12 | |
| 13 | declare(strict_types=1); |
| 14 | |
| 15 | namespace WP2FA\Methods\Passkeys; |
| 16 | |
| 17 | defined( 'ABSPATH' ) || exit; // Exit if accessed directly. |
| 18 | |
| 19 | /** |
| 20 | * Passkeys WebAuthn |
| 21 | */ |
| 22 | if ( ! class_exists( '\WP2FA\Methods\Passkeys\Web_Authn_Exception' ) ) { |
| 23 | |
| 24 | /** |
| 25 | * Throws Web Authn exceptions |
| 26 | * |
| 27 | * @since 3.0.0 |
| 28 | */ |
| 29 | class Web_Authn_Exception extends \Exception { |
| 30 | |
| 31 | public const INVALID_DATA = 1; |
| 32 | public const INVALID_TYPE = 2; |
| 33 | public const INVALID_CHALLENGE = 3; |
| 34 | public const INVALID_ORIGIN = 4; |
| 35 | public const INVALID_RELYING_PARTY = 5; |
| 36 | public const INVALID_SIGNATURE = 6; |
| 37 | public const INVALID_PUBLIC_KEY = 7; |
| 38 | public const CERTIFICATE_NOT_TRUSTED = 8; |
| 39 | public const USER_PRESENT = 9; |
| 40 | public const USER_VERIFICATED = 10; |
| 41 | public const SIGNATURE_COUNTER = 11; |
| 42 | public const CRYPTO_STRONG = 13; |
| 43 | public const BYTE_BUFFER = 14; |
| 44 | public const CBOR = 15; |
| 45 | public const ANDROID_NOT_TRUSTED = 16; |
| 46 | |
| 47 | /** |
| 48 | * Default constructor |
| 49 | * |
| 50 | * @param string $message - The message of the exception. |
| 51 | * @param integer $code - The code of the exception. |
| 52 | * @param [type] $previous - Previous exception. |
| 53 | * |
| 54 | * @since 3.0.0 |
| 55 | */ |
| 56 | public function __construct( $message = '', $code = 0, $previous = null ) { |
| 57 | parent::__construct( $message, $code, $previous ); |
| 58 | } |
| 59 | } |
| 60 | } |
| 61 |