49 instantiations of PasskeyException
Microsoft.AspNetCore.Identity (49)
DefaultPasskeyHandler.cs (2)
48
return PasskeyAttestationResult.Fail(new
PasskeyException
($"An unexpected error occurred during passkey attestation: {ex.Message}", ex));
70
return 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)
37
catch (
PasskeyException
ex)
59
catch (
PasskeyException
ex)
157
?? throw
PasskeyException
.NullAttestationCredentialJson();
161
throw
PasskeyException
.InvalidAttestationCredentialJsonFormat(ex);
167
?? throw
PasskeyException
.NullOriginalCreationOptionsJson();
171
throw
PasskeyException
.InvalidOriginalCreationOptionsJsonFormat(ex);
218
throw
PasskeyException
.MissingAttestedCredentialData();
225
throw
PasskeyException
.UnsupportedCredentialPublicKeyAlgorithm();
234
throw
PasskeyException
.InvalidAttestationStatement();
241
throw
PasskeyException
.CredentialIdMismatch();
250
throw
PasskeyException
.CredentialAlreadyRegistered();
293
?? throw
PasskeyException
.NullAssertionCredentialJson();
297
throw
PasskeyException
.InvalidAssertionCredentialJsonFormat(ex);
303
?? throw
PasskeyException
.NullOriginalRequestOptionsJson();
307
throw
PasskeyException
.InvalidOriginalRequestOptionsJsonFormat(ex);
323
throw
PasskeyException
.CredentialNotAllowed();
340
throw
PasskeyException
.CredentialDoesNotBelongToUser();
347
throw
PasskeyException
.UserHandleMismatch(userId, userHandle);
359
throw
PasskeyException
.MissingUserHandle();
365
throw
PasskeyException
.CredentialDoesNotBelongToUser();
370
throw
PasskeyException
.CredentialDoesNotBelongToUser();
408
throw
PasskeyException
.ExpectedBackupEligibleCredential();
412
throw
PasskeyException
.ExpectedBackupIneligibleCredential();
423
throw
PasskeyException
.InvalidAssertionSignature();
436
throw
PasskeyException
.SignCountLessThanOrEqualToStoredSignCount();
466
throw
PasskeyException
.InvalidCredentialType(ExpectedType, credential.Type);
482
?? throw
PasskeyException
.NullClientDataJson();
486
throw
PasskeyException
.InvalidClientDataJsonFormat(ex);
493
throw
PasskeyException
.InvalidClientDataType(expectedType, clientData.Type);
499
throw
PasskeyException
.InvalidChallenge();
510
throw
PasskeyException
.InvalidOrigin(clientData.Origin);
522
throw
PasskeyException
.InvalidTokenBindingStatus(status);
536
throw
PasskeyException
.InvalidRelyingPartyIDHash();
544
throw
PasskeyException
.UserNotPresent();
550
throw
PasskeyException
.UserNotVerified();
556
throw
PasskeyException
.NotBackupEligibleYetBackedUp();
563
throw
PasskeyException
.BackupEligibilityDisallowedYetBackupEligible();
567
throw
PasskeyException
.BackupEligibilityRequiredYetNotBackupEligible();
574
throw
PasskeyException
.BackupDisallowedYetBackedUp();
578
throw
PasskeyException
.BackupRequiredYetNotBackedUp();
PasskeyAssertionResult.cs (3)
35
public
PasskeyException
? Failure { get; }
44
internal PasskeyAssertionResult(
PasskeyException
failure)
75
public static PasskeyAssertionResult<TUser> Fail<TUser>(
PasskeyException
failure)
PasskeyAttestationResult.cs (3)
28
public
PasskeyException
? Failure { get; }
36
private PasskeyAttestationResult(
PasskeyException
failure)
58
public 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)
10
extension(
PasskeyException
)
12
public static
PasskeyException
InvalidCredentialType(string expectedType, string actualType)
15
public static
PasskeyException
InvalidClientDataType(string expectedType, string actualType)
18
public static
PasskeyException
InvalidChallenge()
21
public static
PasskeyException
InvalidOrigin(string origin)
24
public static
PasskeyException
InvalidRelyingPartyIDHash()
27
public static
PasskeyException
UserNotPresent()
30
public static
PasskeyException
UserNotVerified()
33
public static
PasskeyException
NotBackupEligibleYetBackedUp()
36
public static
PasskeyException
BackupEligibilityDisallowedYetBackupEligible()
39
public static
PasskeyException
BackupEligibilityRequiredYetNotBackupEligible()
42
public static
PasskeyException
BackupDisallowedYetBackedUp()
45
public static
PasskeyException
BackupRequiredYetNotBackedUp()
48
public static
PasskeyException
MissingAttestedCredentialData()
51
public static
PasskeyException
UnsupportedCredentialPublicKeyAlgorithm()
54
public static
PasskeyException
InvalidAttestationStatement()
57
public static
PasskeyException
InvalidCredentialIdLength(int length)
60
public static
PasskeyException
CredentialIdMismatch()
63
public static
PasskeyException
CredentialAlreadyRegistered()
66
public static
PasskeyException
CredentialNotAllowed()
69
public static
PasskeyException
CredentialDoesNotBelongToUser()
72
public static
PasskeyException
UserHandleMismatch(string providedUserHandle, string credentialUserHandle)
75
public static
PasskeyException
MissingUserHandle()
78
public static
PasskeyException
ExpectedBackupEligibleCredential()
81
public static
PasskeyException
ExpectedBackupIneligibleCredential()
84
public static
PasskeyException
InvalidAssertionSignature()
87
public static
PasskeyException
SignCountLessThanOrEqualToStoredSignCount()
90
public static
PasskeyException
InvalidAttestationObject(Exception ex)
93
public static
PasskeyException
InvalidAttestationObjectFormat(Exception ex)
96
public static
PasskeyException
MissingAttestationStatementFormat()
99
public static
PasskeyException
MissingAttestationStatement()
102
public static
PasskeyException
MissingAuthenticatorData()
105
public static
PasskeyException
InvalidAuthenticatorDataLength(int length)
108
public static
PasskeyException
InvalidAuthenticatorDataFormat(Exception? ex = null)
111
public static
PasskeyException
InvalidAttestedCredentialDataLength(int length)
114
public static
PasskeyException
InvalidAttestedCredentialDataFormat(Exception? ex = null)
117
public static
PasskeyException
InvalidTokenBindingStatus(string tokenBindingStatus)
120
public static
PasskeyException
NullAttestationCredentialJson()
123
public static
PasskeyException
InvalidAttestationCredentialJsonFormat(JsonException ex)
126
public static
PasskeyException
NullOriginalCreationOptionsJson()
129
public static
PasskeyException
InvalidOriginalCreationOptionsJsonFormat(JsonException ex)
132
public static
PasskeyException
NullAssertionCredentialJson()
135
public static
PasskeyException
InvalidAssertionCredentialJsonFormat(JsonException ex)
138
public static
PasskeyException
NullOriginalRequestOptionsJson()
141
public static
PasskeyException
InvalidOriginalRequestOptionsJsonFormat(JsonException ex)
144
public static
PasskeyException
NullClientDataJson()
147
public static
PasskeyException
InvalidClientDataJsonFormat(JsonException ex)
150
public static
PasskeyException
InvalidCredentialPublicKey(Exception ex)
Passkeys\AttestationObject.cs (7)
46
catch (
PasskeyException
)
52
throw
PasskeyException
.InvalidAttestationObjectFormat(ex);
56
throw
PasskeyException
.InvalidAttestationObjectFormat(ex);
60
throw
PasskeyException
.InvalidAttestationObject(ex);
96
throw
PasskeyException
.MissingAttestationStatementFormat();
101
throw
PasskeyException
.MissingAttestationStatement();
106
throw
PasskeyException
.MissingAuthenticatorData();
Passkeys\AttestedCredentialData.cs (4)
37
catch (
PasskeyException
)
43
throw
PasskeyException
.InvalidAttestedCredentialDataFormat(ex);
58
throw
PasskeyException
.InvalidAttestedCredentialDataLength(data.Length);
69
throw
PasskeyException
.InvalidCredentialIdLength(credentialIdLength);
Passkeys\AuthenticatorData.cs (4)
81
catch (
PasskeyException
)
87
throw
PasskeyException
.InvalidAuthenticatorDataFormat(ex);
102
throw
PasskeyException
.InvalidAuthenticatorDataLength(bytes.Length);
135
throw
PasskeyException
.InvalidAuthenticatorDataFormat();
Passkeys\CredentialPublicKey.cs (2)
50
catch (
PasskeyException
)
56
throw
PasskeyException
.InvalidCredentialPublicKey(ex);