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)
180
return PasskeyAttestationResult.Fail(new
PasskeyException
($"An unexpected error occurred during passkey attestation: {ex.Message}", ex));
204
return 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)
35
public
PasskeyException
? Failure { get; }
44
internal PasskeyAssertionResult(
PasskeyException
failure)
75
public static PasskeyAssertionResult<TUser> Fail<TUser>(
PasskeyException
failure)
PasskeyAttestationResult.cs (3)
34
public
PasskeyException
? Failure { get; }
43
private PasskeyAttestationResult(
PasskeyException
failure)
66
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 (43)
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
MissingAttestedCredentialData()
39
public static
PasskeyException
UnsupportedCredentialPublicKeyAlgorithm()
42
public static
PasskeyException
InvalidAttestationStatement()
45
public static
PasskeyException
InvalidCredentialIdLength(int length)
48
public static
PasskeyException
CredentialIdMismatch()
51
public static
PasskeyException
CredentialAlreadyRegistered()
54
public static
PasskeyException
CredentialDoesNotBelongToUser()
57
public static
PasskeyException
UserHandleMismatch(string providedUserHandle, string credentialUserHandle)
60
public static
PasskeyException
MissingUserHandle()
63
public static
PasskeyException
ExpectedBackupEligibleCredential()
66
public static
PasskeyException
ExpectedBackupIneligibleCredential()
69
public static
PasskeyException
InvalidAssertionSignature()
72
public static
PasskeyException
SignCountLessThanOrEqualToStoredSignCount()
75
public static
PasskeyException
InvalidAttestationObject(Exception ex)
78
public static
PasskeyException
InvalidAttestationObjectFormat(Exception ex)
81
public static
PasskeyException
MissingAttestationStatementFormat()
84
public static
PasskeyException
MissingAttestationStatement()
87
public static
PasskeyException
MissingAuthenticatorData()
90
public static
PasskeyException
InvalidAuthenticatorDataLength(int length)
93
public static
PasskeyException
InvalidAuthenticatorDataFormat(Exception? ex = null)
96
public static
PasskeyException
InvalidAttestedCredentialDataLength(int length)
99
public static
PasskeyException
InvalidAttestedCredentialDataFormat(Exception? ex = null)
102
public static
PasskeyException
InvalidTokenBindingStatus(string tokenBindingStatus)
105
public static
PasskeyException
NullAttestationCredentialJson()
108
public static
PasskeyException
InvalidAttestationCredentialJsonFormat(JsonException ex)
111
public static
PasskeyException
NullAssertionCredentialJson()
114
public static
PasskeyException
InvalidAssertionCredentialJsonFormat(JsonException ex)
117
public static
PasskeyException
NullClientDataJson()
120
public static
PasskeyException
InvalidClientDataJsonFormat(JsonException ex)
123
public static
PasskeyException
InvalidCredentialPublicKey(Exception ex)
126
public static
PasskeyException
NullAttestationStateJson()
129
public static
PasskeyException
NullAssertionStateJson()
132
public static
PasskeyException
InvalidAttestationStateJsonFormat(JsonException ex)
135
public static
PasskeyException
InvalidAssertionStateJsonFormat(JsonException ex)
PasskeyHandler.cs (39)
169
catch (
PasskeyException
ex)
193
catch (
PasskeyException
ex)
225
?? throw
PasskeyException
.NullAttestationCredentialJson();
229
throw
PasskeyException
.InvalidAttestationCredentialJsonFormat(ex);
236
throw
PasskeyException
.NullAttestationStateJson();
240
?? throw
PasskeyException
.NullAttestationStateJson();
244
throw
PasskeyException
.InvalidAttestationStateJsonFormat(ex);
290
throw
PasskeyException
.MissingAttestedCredentialData();
299
throw
PasskeyException
.UnsupportedCredentialPublicKeyAlgorithm();
304
throw
PasskeyException
.UnsupportedCredentialPublicKeyAlgorithm();
321
throw
PasskeyException
.InvalidAttestationStatement();
329
throw
PasskeyException
.CredentialIdMismatch();
338
throw
PasskeyException
.CredentialAlreadyRegistered();
380
?? throw
PasskeyException
.NullAssertionCredentialJson();
384
throw
PasskeyException
.InvalidAssertionCredentialJsonFormat(ex);
391
throw
PasskeyException
.NullAssertionStateJson();
395
?? throw
PasskeyException
.NullAssertionStateJson();
399
throw
PasskeyException
.InvalidAssertionStateJsonFormat(ex);
407
?? throw
PasskeyException
.CredentialDoesNotBelongToUser();
441
throw
PasskeyException
.CredentialDoesNotBelongToUser();
445
throw
PasskeyException
.UserHandleMismatch(originalUserId, userHandle);
456
throw
PasskeyException
.MissingUserHandle();
462
throw
PasskeyException
.CredentialDoesNotBelongToUser();
467
throw
PasskeyException
.CredentialDoesNotBelongToUser();
502
throw
PasskeyException
.ExpectedBackupEligibleCredential();
506
throw
PasskeyException
.ExpectedBackupIneligibleCredential();
517
throw
PasskeyException
.InvalidAssertionSignature();
530
throw
PasskeyException
.SignCountLessThanOrEqualToStoredSignCount();
560
throw
PasskeyException
.InvalidCredentialType(ExpectedType, credential.Type);
576
?? throw
PasskeyException
.NullClientDataJson();
580
throw
PasskeyException
.InvalidClientDataJsonFormat(ex);
587
throw
PasskeyException
.InvalidClientDataType(expectedType, clientData.Type);
593
throw
PasskeyException
.InvalidChallenge();
600
throw
PasskeyException
.InvalidOrigin(clientData.Origin);
612
throw
PasskeyException
.InvalidTokenBindingStatus(status);
626
throw
PasskeyException
.InvalidRelyingPartyIDHash();
634
throw
PasskeyException
.UserNotPresent();
641
throw
PasskeyException
.UserNotVerified();
647
throw
PasskeyException
.NotBackupEligibleYetBackedUp();
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)
90
catch (
PasskeyException
)
96
throw
PasskeyException
.InvalidCredentialPublicKey(ex);