44 instantiations of PasskeyException
Microsoft.AspNetCore.Identity (44)
PasskeyExceptionExtensions.cs (42)
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("No attested credential data was provided by the authenticator."); 40=> new("The credential public key algorithm does not match any of the supported algorithms."); 43=> new("The attestation statement was not valid."); 46=> new($"Expected the credential ID to have a length between 1 and 1023 bytes, but got {length}."); 49=> new("The provided credential ID does not match the credential ID in the attested credential data."); 52=> new("The credential is already registered for a user."); 55=> new("The provided credential does not belong to the specified user."); 58=> new($"The provided user handle '{providedUserHandle}' does not match the credential's user handle '{credentialUserHandle}'."); 61=> new("The authenticator response was missing a user handle."); 64=> new("The stored credential is eligible for backup, but the provided credential was unexpectedly ineligible for backup."); 67=> new("The stored credential is ineligible for backup, but the provided credential was unexpectedly eligible for backup."); 70=> new("The assertion signature was invalid."); 73=> new("The authenticator's signature counter is unexpectedly less than or equal to the stored signature counter."); 76=> new($"An exception occurred while parsing the attestation object: {ex.Message}", ex); 79=> new("The attestation object had an invalid format.", ex); 82=> new("The attestation object did not include an attestation statement format."); 85=> new("The attestation object did not include an attestation statement."); 88=> new("The attestation object did not include authenticator data."); 91=> new($"The authenticator data had an invalid byte count of {length}."); 94=> new($"The authenticator data had an invalid format.", ex); 97=> new($"The attested credential data had an invalid byte count of {length}."); 100=> new($"The attested credential data had an invalid format.", ex); 103=> new($"Invalid token binding status '{tokenBindingStatus}'."); 106=> new("The attestation credential JSON was unexpectedly null."); 109=> new($"The attestation credential JSON had an invalid format: {ex.Message}", ex); 112=> new("The assertion credential JSON was unexpectedly null."); 115=> new($"The assertion credential JSON had an invalid format: {ex.Message}", ex); 118=> new("The client data JSON was unexpectedly null."); 121=> new($"The client data JSON had an invalid format: {ex.Message}", ex); 124=> new($"The credential public key was invalid.", ex); 127=> new("the assertion state json was unexpectedly null."); 130=> new("the assertion state json was unexpectedly null."); 133=> new($"The attestation state JSON had an invalid format: {ex.Message}", ex); 136=> new($"The assertion state JSON had an invalid format: {ex.Message}", ex);
PasskeyHandler.cs (2)
180return PasskeyAttestationResult.Fail(new PasskeyException($"An unexpected error occurred during passkey attestation: {ex.Message}", ex)); 204return PasskeyAssertionResult.Fail<TUser>(new PasskeyException($"An unexpected error occurred during passkey assertion: {ex.Message}", ex));
107 references to PasskeyException
Microsoft.AspNetCore.Identity (107)
PasskeyAssertionResult.cs (3)
35public PasskeyException? Failure { get; } 44internal PasskeyAssertionResult(PasskeyException failure) 75public static PasskeyAssertionResult<TUser> Fail<TUser>(PasskeyException failure)
PasskeyAttestationResult.cs (3)
34public PasskeyException? Failure { get; } 43private PasskeyAttestationResult(PasskeyException failure) 66public 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 (43)
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 MissingAttestedCredentialData() 39public static PasskeyException UnsupportedCredentialPublicKeyAlgorithm() 42public static PasskeyException InvalidAttestationStatement() 45public static PasskeyException InvalidCredentialIdLength(int length) 48public static PasskeyException CredentialIdMismatch() 51public static PasskeyException CredentialAlreadyRegistered() 54public static PasskeyException CredentialDoesNotBelongToUser() 57public static PasskeyException UserHandleMismatch(string providedUserHandle, string credentialUserHandle) 60public static PasskeyException MissingUserHandle() 63public static PasskeyException ExpectedBackupEligibleCredential() 66public static PasskeyException ExpectedBackupIneligibleCredential() 69public static PasskeyException InvalidAssertionSignature() 72public static PasskeyException SignCountLessThanOrEqualToStoredSignCount() 75public static PasskeyException InvalidAttestationObject(Exception ex) 78public static PasskeyException InvalidAttestationObjectFormat(Exception ex) 81public static PasskeyException MissingAttestationStatementFormat() 84public static PasskeyException MissingAttestationStatement() 87public static PasskeyException MissingAuthenticatorData() 90public static PasskeyException InvalidAuthenticatorDataLength(int length) 93public static PasskeyException InvalidAuthenticatorDataFormat(Exception? ex = null) 96public static PasskeyException InvalidAttestedCredentialDataLength(int length) 99public static PasskeyException InvalidAttestedCredentialDataFormat(Exception? ex = null) 102public static PasskeyException InvalidTokenBindingStatus(string tokenBindingStatus) 105public static PasskeyException NullAttestationCredentialJson() 108public static PasskeyException InvalidAttestationCredentialJsonFormat(JsonException ex) 111public static PasskeyException NullAssertionCredentialJson() 114public static PasskeyException InvalidAssertionCredentialJsonFormat(JsonException ex) 117public static PasskeyException NullClientDataJson() 120public static PasskeyException InvalidClientDataJsonFormat(JsonException ex) 123public static PasskeyException InvalidCredentialPublicKey(Exception ex) 126public static PasskeyException NullAttestationStateJson() 129public static PasskeyException NullAssertionStateJson() 132public static PasskeyException InvalidAttestationStateJsonFormat(JsonException ex) 135public static PasskeyException InvalidAssertionStateJsonFormat(JsonException ex)
PasskeyHandler.cs (39)
169catch (PasskeyException ex) 193catch (PasskeyException ex) 225?? throw PasskeyException.NullAttestationCredentialJson(); 229throw PasskeyException.InvalidAttestationCredentialJsonFormat(ex); 236throw PasskeyException.NullAttestationStateJson(); 240?? throw PasskeyException.NullAttestationStateJson(); 244throw PasskeyException.InvalidAttestationStateJsonFormat(ex); 290throw PasskeyException.MissingAttestedCredentialData(); 299throw PasskeyException.UnsupportedCredentialPublicKeyAlgorithm(); 304throw PasskeyException.UnsupportedCredentialPublicKeyAlgorithm(); 321throw PasskeyException.InvalidAttestationStatement(); 329throw PasskeyException.CredentialIdMismatch(); 338throw PasskeyException.CredentialAlreadyRegistered(); 380?? throw PasskeyException.NullAssertionCredentialJson(); 384throw PasskeyException.InvalidAssertionCredentialJsonFormat(ex); 391throw PasskeyException.NullAssertionStateJson(); 395?? throw PasskeyException.NullAssertionStateJson(); 399throw PasskeyException.InvalidAssertionStateJsonFormat(ex); 407?? throw PasskeyException.CredentialDoesNotBelongToUser(); 441throw PasskeyException.CredentialDoesNotBelongToUser(); 445throw PasskeyException.UserHandleMismatch(originalUserId, userHandle); 456throw PasskeyException.MissingUserHandle(); 462throw PasskeyException.CredentialDoesNotBelongToUser(); 467throw PasskeyException.CredentialDoesNotBelongToUser(); 502throw PasskeyException.ExpectedBackupEligibleCredential(); 506throw PasskeyException.ExpectedBackupIneligibleCredential(); 517throw PasskeyException.InvalidAssertionSignature(); 530throw PasskeyException.SignCountLessThanOrEqualToStoredSignCount(); 560throw PasskeyException.InvalidCredentialType(ExpectedType, credential.Type); 576?? throw PasskeyException.NullClientDataJson(); 580throw PasskeyException.InvalidClientDataJsonFormat(ex); 587throw PasskeyException.InvalidClientDataType(expectedType, clientData.Type); 593throw PasskeyException.InvalidChallenge(); 600throw PasskeyException.InvalidOrigin(clientData.Origin); 612throw PasskeyException.InvalidTokenBindingStatus(status); 626throw PasskeyException.InvalidRelyingPartyIDHash(); 634throw PasskeyException.UserNotPresent(); 641throw PasskeyException.UserNotVerified(); 647throw PasskeyException.NotBackupEligibleYetBackedUp();
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)
90catch (PasskeyException) 96throw PasskeyException.InvalidCredentialPublicKey(ex);