49 instantiations of PasskeyException
Microsoft.AspNetCore.Identity (49)
DefaultPasskeyHandler.cs (2)
48return PasskeyAttestationResult.Fail(new PasskeyException($"An unexpected error occurred during passkey attestation: {ex.Message}", ex)); 70return PasskeyAssertionResult.Fail<TUser>(new PasskeyException($"An unexpected error occurred during passkey assertion: {ex.Message}", ex));
PasskeyExceptionExtensions.cs (47)
13=> new($"Expected credential type '{expectedType}', got '{actualType}'."); 16=> new($"Expected the client data JSON 'type' field to be '{expectedType}', got '{actualType}'."); 19=> new("The authenticator response challenge does not match original challenge."); 22=> new($"The authenticator response had an invalid origin '{origin}'."); 25=> new("The authenticator data included an invalid Relying Party ID hash."); 28=> new("The authenticator data flags did not include the 'UserPresent' flag."); 31=> new("User verification is required, but the authenticator data flags did not have the 'UserVerified' flag."); 34=> new("The credential is backed up, but the authenticator data flags did not have the 'BackupEligible' flag."); 37=> new("Credential backup eligibility is disallowed, but the credential was eligible for backup."); 40=> new("Credential backup eligibility is required, but the credential was not eligible for backup."); 43=> new("Credential backup is disallowed, but the credential was backed up."); 46=> new("Credential backup is required, but the credential was not backed up."); 49=> new("No attested credential data was provided by the authenticator."); 52=> new("The credential public key algorithm does not match any of the supported algorithms."); 55=> new("The attestation statement was not valid."); 58=> new($"Expected the credential ID to have a length between 1 and 1023 bytes, but got {length}."); 61=> new("The provided credential ID does not match the credential ID in the attested credential data."); 64=> new("The credential is already registered for a user."); 67=> new("The provided credential ID was not in the list of allowed credentials."); 70=> new("The provided credential does not belong to the specified user."); 73=> new($"The provided user handle '{providedUserHandle}' does not match the credential's user handle '{credentialUserHandle}'."); 76=> new("The authenticator response was missing a user handle."); 79=> new("The stored credential is eligible for backup, but the provided credential was unexpectedly ineligible for backup."); 82=> new("The stored credential is ineligible for backup, but the provided credential was unexpectedly eligible for backup."); 85=> new("The assertion signature was invalid."); 88=> new("The authenticator's signature counter is unexpectedly less than or equal to the stored signature counter."); 91=> new($"An exception occurred while parsing the attestation object: {ex.Message}", ex); 94=> new("The attestation object had an invalid format.", ex); 97=> new("The attestation object did not include an attestation statement format."); 100=> new("The attestation object did not include an attestation statement."); 103=> new("The attestation object did not include authenticator data."); 106=> new($"The authenticator data had an invalid byte count of {length}."); 109=> new($"The authenticator data had an invalid format.", ex); 112=> new($"The attested credential data had an invalid byte count of {length}."); 115=> new($"The attested credential data had an invalid format.", ex); 118=> new($"Invalid token binding status '{tokenBindingStatus}'."); 121=> new("The attestation credential JSON was unexpectedly null."); 124=> new($"The attestation credential JSON had an invalid format: {ex.Message}", ex); 127=> new("The original passkey creation options were unexpectedly null."); 130=> new($"The original passkey creation options had an invalid format: {ex.Message}", ex); 133=> new("The assertion credential JSON was unexpectedly null."); 136=> new($"The assertion credential JSON had an invalid format: {ex.Message}", ex); 139=> new("The original passkey request options were unexpectedly null."); 142=> new($"The original passkey request options had an invalid format: {ex.Message}", ex); 145=> new("The client data JSON was unexpectedly null."); 148=> new($"The client data JSON had an invalid format: {ex.Message}", ex); 151=> new($"The credential public key was invalid.", ex);
113 references to PasskeyException
Microsoft.AspNetCore.Identity (113)
DefaultPasskeyHandler.cs (40)
37catch (PasskeyException ex) 59catch (PasskeyException ex) 157?? throw PasskeyException.NullAttestationCredentialJson(); 161throw PasskeyException.InvalidAttestationCredentialJsonFormat(ex); 167?? throw PasskeyException.NullOriginalCreationOptionsJson(); 171throw PasskeyException.InvalidOriginalCreationOptionsJsonFormat(ex); 218throw PasskeyException.MissingAttestedCredentialData(); 225throw PasskeyException.UnsupportedCredentialPublicKeyAlgorithm(); 234throw PasskeyException.InvalidAttestationStatement(); 241throw PasskeyException.CredentialIdMismatch(); 250throw PasskeyException.CredentialAlreadyRegistered(); 293?? throw PasskeyException.NullAssertionCredentialJson(); 297throw PasskeyException.InvalidAssertionCredentialJsonFormat(ex); 303?? throw PasskeyException.NullOriginalRequestOptionsJson(); 307throw PasskeyException.InvalidOriginalRequestOptionsJsonFormat(ex); 323throw PasskeyException.CredentialNotAllowed(); 340throw PasskeyException.CredentialDoesNotBelongToUser(); 347throw PasskeyException.UserHandleMismatch(userId, userHandle); 359throw PasskeyException.MissingUserHandle(); 365throw PasskeyException.CredentialDoesNotBelongToUser(); 370throw PasskeyException.CredentialDoesNotBelongToUser(); 408throw PasskeyException.ExpectedBackupEligibleCredential(); 412throw PasskeyException.ExpectedBackupIneligibleCredential(); 423throw PasskeyException.InvalidAssertionSignature(); 436throw PasskeyException.SignCountLessThanOrEqualToStoredSignCount(); 466throw PasskeyException.InvalidCredentialType(ExpectedType, credential.Type); 482?? throw PasskeyException.NullClientDataJson(); 486throw PasskeyException.InvalidClientDataJsonFormat(ex); 493throw PasskeyException.InvalidClientDataType(expectedType, clientData.Type); 499throw PasskeyException.InvalidChallenge(); 510throw PasskeyException.InvalidOrigin(clientData.Origin); 522throw PasskeyException.InvalidTokenBindingStatus(status); 536throw PasskeyException.InvalidRelyingPartyIDHash(); 544throw PasskeyException.UserNotPresent(); 550throw PasskeyException.UserNotVerified(); 556throw PasskeyException.NotBackupEligibleYetBackedUp(); 563throw PasskeyException.BackupEligibilityDisallowedYetBackupEligible(); 567throw PasskeyException.BackupEligibilityRequiredYetNotBackupEligible(); 574throw PasskeyException.BackupDisallowedYetBackedUp(); 578throw PasskeyException.BackupRequiredYetNotBackedUp();
PasskeyAssertionResult.cs (3)
35public PasskeyException? Failure { get; } 44internal PasskeyAssertionResult(PasskeyException failure) 75public static PasskeyAssertionResult<TUser> Fail<TUser>(PasskeyException failure)
PasskeyAttestationResult.cs (3)
28public PasskeyException? Failure { get; } 36private PasskeyAttestationResult(PasskeyException failure) 58public static PasskeyAttestationResult Fail(PasskeyException failure)
PasskeyException.cs (2)
12/// Constructs a new <see cref="PasskeyException"/> instance. 20/// Constructs a new <see cref="PasskeyException"/> instance.
PasskeyExceptionExtensions.cs (48)
10extension(PasskeyException) 12public static PasskeyException InvalidCredentialType(string expectedType, string actualType) 15public static PasskeyException InvalidClientDataType(string expectedType, string actualType) 18public static PasskeyException InvalidChallenge() 21public static PasskeyException InvalidOrigin(string origin) 24public static PasskeyException InvalidRelyingPartyIDHash() 27public static PasskeyException UserNotPresent() 30public static PasskeyException UserNotVerified() 33public static PasskeyException NotBackupEligibleYetBackedUp() 36public static PasskeyException BackupEligibilityDisallowedYetBackupEligible() 39public static PasskeyException BackupEligibilityRequiredYetNotBackupEligible() 42public static PasskeyException BackupDisallowedYetBackedUp() 45public static PasskeyException BackupRequiredYetNotBackedUp() 48public static PasskeyException MissingAttestedCredentialData() 51public static PasskeyException UnsupportedCredentialPublicKeyAlgorithm() 54public static PasskeyException InvalidAttestationStatement() 57public static PasskeyException InvalidCredentialIdLength(int length) 60public static PasskeyException CredentialIdMismatch() 63public static PasskeyException CredentialAlreadyRegistered() 66public static PasskeyException CredentialNotAllowed() 69public static PasskeyException CredentialDoesNotBelongToUser() 72public static PasskeyException UserHandleMismatch(string providedUserHandle, string credentialUserHandle) 75public static PasskeyException MissingUserHandle() 78public static PasskeyException ExpectedBackupEligibleCredential() 81public static PasskeyException ExpectedBackupIneligibleCredential() 84public static PasskeyException InvalidAssertionSignature() 87public static PasskeyException SignCountLessThanOrEqualToStoredSignCount() 90public static PasskeyException InvalidAttestationObject(Exception ex) 93public static PasskeyException InvalidAttestationObjectFormat(Exception ex) 96public static PasskeyException MissingAttestationStatementFormat() 99public static PasskeyException MissingAttestationStatement() 102public static PasskeyException MissingAuthenticatorData() 105public static PasskeyException InvalidAuthenticatorDataLength(int length) 108public static PasskeyException InvalidAuthenticatorDataFormat(Exception? ex = null) 111public static PasskeyException InvalidAttestedCredentialDataLength(int length) 114public static PasskeyException InvalidAttestedCredentialDataFormat(Exception? ex = null) 117public static PasskeyException InvalidTokenBindingStatus(string tokenBindingStatus) 120public static PasskeyException NullAttestationCredentialJson() 123public static PasskeyException InvalidAttestationCredentialJsonFormat(JsonException ex) 126public static PasskeyException NullOriginalCreationOptionsJson() 129public static PasskeyException InvalidOriginalCreationOptionsJsonFormat(JsonException ex) 132public static PasskeyException NullAssertionCredentialJson() 135public static PasskeyException InvalidAssertionCredentialJsonFormat(JsonException ex) 138public static PasskeyException NullOriginalRequestOptionsJson() 141public static PasskeyException InvalidOriginalRequestOptionsJsonFormat(JsonException ex) 144public static PasskeyException NullClientDataJson() 147public static PasskeyException InvalidClientDataJsonFormat(JsonException ex) 150public static PasskeyException InvalidCredentialPublicKey(Exception ex)
Passkeys\AttestationObject.cs (7)
46catch (PasskeyException) 52throw PasskeyException.InvalidAttestationObjectFormat(ex); 56throw PasskeyException.InvalidAttestationObjectFormat(ex); 60throw PasskeyException.InvalidAttestationObject(ex); 96throw PasskeyException.MissingAttestationStatementFormat(); 101throw PasskeyException.MissingAttestationStatement(); 106throw PasskeyException.MissingAuthenticatorData();
Passkeys\AttestedCredentialData.cs (4)
37catch (PasskeyException) 43throw PasskeyException.InvalidAttestedCredentialDataFormat(ex); 58throw PasskeyException.InvalidAttestedCredentialDataLength(data.Length); 69throw PasskeyException.InvalidCredentialIdLength(credentialIdLength);
Passkeys\AuthenticatorData.cs (4)
81catch (PasskeyException) 87throw PasskeyException.InvalidAuthenticatorDataFormat(ex); 102throw PasskeyException.InvalidAuthenticatorDataLength(bytes.Length); 135throw PasskeyException.InvalidAuthenticatorDataFormat();
Passkeys\CredentialPublicKey.cs (2)
50catch (PasskeyException) 56throw PasskeyException.InvalidCredentialPublicKey(ex);