1 write to Failure
Microsoft.AspNetCore.Identity (1)
PasskeyAttestationResult.cs (1)
39Failure = failure;
85 references to Failure
IdentitySample.PasskeyConformance (1)
Program.cs (1)
89return Results.BadRequest(new FailedResponse($"Attestation failed: {attestationResult.Failure.Message}"));
Microsoft.AspNetCore.Identity (2)
PasskeyAttestationResult.cs (1)
17[MemberNotNullWhen(false, nameof(Failure))]
SignInManager.cs (1)
491Logger.LogDebug(EventIds.PasskeyAttestationFailed, "Passkey attestation failed: {message}", result.Failure.Message);
Microsoft.AspNetCore.Identity.Test (82)
Passkeys\DefaultPasskeyHandlerAttestationTest.cs (82)
45Assert.StartsWith("The attestation credential JSON had an invalid format", result.Failure.Message); 46Assert.Contains("was missing required properties including: 'id'", result.Failure.Message); 64Assert.StartsWith("The attestation credential JSON had an invalid format", result.Failure.Message); 80Assert.StartsWith("The attestation credential JSON had an invalid format", result.Failure.Message); 81Assert.Contains("base64url string", result.Failure.Message); 96Assert.StartsWith("The attestation credential JSON had an invalid format", result.Failure.Message); 97Assert.Contains("was missing required properties including: 'type'", result.Failure.Message); 115Assert.StartsWith("The attestation credential JSON had an invalid format", result.Failure.Message); 130Assert.StartsWith("Expected credential type 'public-key', got 'unexpected-value'", result.Failure.Message); 145Assert.StartsWith("The attestation credential JSON had an invalid format", result.Failure.Message); 146Assert.Contains("was missing required properties including: 'response'", result.Failure.Message); 164Assert.StartsWith("The attestation credential JSON had an invalid format", result.Failure.Message); 180Assert.StartsWith("The original passkey creation options had an invalid format", result.Failure.Message); 181Assert.Contains("was missing required properties including: 'name'", result.Failure.Message); 199Assert.StartsWith("The original passkey creation options had an invalid format", result.Failure.Message); 214Assert.StartsWith("The original passkey creation options had an invalid format", result.Failure.Message); 215Assert.Contains("was missing required properties including: 'rp'", result.Failure.Message); 231Assert.StartsWith("The original passkey creation options had an invalid format", result.Failure.Message); 232Assert.Contains("was missing required properties including: 'id'", result.Failure.Message); 248Assert.StartsWith("The original passkey creation options had an invalid format", result.Failure.Message); 249Assert.Contains("base64url string", result.Failure.Message); 267Assert.StartsWith("The original passkey creation options had an invalid format", result.Failure.Message); 283Assert.StartsWith("The original passkey creation options had an invalid format", result.Failure.Message); 284Assert.Contains("was missing required properties including: 'name'", result.Failure.Message); 302Assert.StartsWith("The original passkey creation options had an invalid format", result.Failure.Message); 318Assert.StartsWith("The original passkey creation options had an invalid format", result.Failure.Message); 319Assert.Contains("was missing required properties including: 'displayName'", result.Failure.Message); 337Assert.StartsWith("The original passkey creation options had an invalid format", result.Failure.Message); 352Assert.StartsWith("The original passkey creation options had an invalid format", result.Failure.Message); 353Assert.Contains("was missing required properties including: 'user'", result.Failure.Message); 369Assert.StartsWith("The original passkey creation options had an invalid format", result.Failure.Message); 370Assert.Contains("was missing required properties including: 'challenge'", result.Failure.Message); 387Assert.StartsWith("The original passkey creation options had an invalid format", result.Failure.Message); 388Assert.Contains("base64url string", result.Failure.Message); 406Assert.StartsWith("The original passkey creation options had an invalid format", result.Failure.Message); 422Assert.StartsWith("The attestation credential JSON had an invalid format", result.Failure.Message); 423Assert.Contains("was missing required properties including: 'clientDataJSON'", result.Failure.Message); 441Assert.StartsWith("The attestation credential JSON had an invalid format", result.Failure.Message); 456Assert.StartsWith("The client data JSON had an invalid format", result.Failure.Message); 472Assert.StartsWith("The attestation credential JSON had an invalid format", result.Failure.Message); 473Assert.Contains("was missing required properties including: 'attestationObject'", result.Failure.Message); 491Assert.StartsWith("The attestation credential JSON had an invalid format", result.Failure.Message); 506Assert.StartsWith("The attestation object had an invalid format", result.Failure.Message); 521Assert.StartsWith("The client data JSON had an invalid format", result.Failure.Message); 522Assert.Contains("was missing required properties including: 'type'", result.Failure.Message); 540Assert.StartsWith("The client data JSON had an invalid format", result.Failure.Message); 558Assert.StartsWith("Expected the client data JSON 'type' field to be 'webauthn.create'", result.Failure.Message); 573Assert.StartsWith("The client data JSON had an invalid format", result.Failure.Message); 574Assert.Contains("was missing required properties including: 'challenge'", result.Failure.Message); 592Assert.StartsWith("The client data JSON had an invalid format", result.Failure.Message); 607Assert.StartsWith("The authenticator response challenge does not match original challenge", result.Failure.Message); 623Assert.StartsWith("The client data JSON had an invalid format", result.Failure.Message); 624Assert.Contains("base64url string", result.Failure.Message); 645Assert.StartsWith("The authenticator response challenge does not match original challenge", result.Failure.Message); 660Assert.StartsWith("The client data JSON had an invalid format", result.Failure.Message); 661Assert.Contains("was missing required properties including: 'origin'", result.Failure.Message); 679Assert.StartsWith("The client data JSON had an invalid format", result.Failure.Message); 694Assert.StartsWith("The authenticator response had an invalid origin ''", result.Failure.Message); 716Assert.StartsWith($"The authenticator response had an invalid origin '{returnedOrigin}'", result.Failure.Message); 733Assert.StartsWith("The client data JSON had an invalid format", result.Failure.Message); 748Assert.StartsWith("The client data JSON had an invalid format", result.Failure.Message); 749Assert.Contains("was missing required properties including: 'status'", result.Failure.Message); 768Assert.StartsWith("Invalid token binding status 'unexpected-value'", result.Failure.Message); 798Assert.StartsWith("The credential is backed up, but the authenticator data flags did not have the 'BackupEligible' flag", result.Failure.Message); 832result.Failure.Message); 850result.Failure.Message); 885result.Failure.Message); 903result.Failure.Message); 915Assert.StartsWith("The attestation object had an invalid format", result.Failure.Message); 931Assert.StartsWith("The attestation object did not include an attestation statement format", result.Failure.Message); 947Assert.StartsWith("The attestation object did not include an attestation statement", result.Failure.Message); 963Assert.StartsWith("The attestation object did not include authenticator data", result.Failure.Message); 978Assert.StartsWith("The authenticator data had an invalid byte count of 0", result.Failure.Message); 994Assert.StartsWith("The authenticator data had an invalid format", result.Failure.Message); 1010Assert.StartsWith("The attested credential data had an invalid byte count of 0", result.Failure.Message); 1026Assert.StartsWith("No attested credential data was provided by the authenticator", result.Failure.Message); 1041Assert.StartsWith("The authenticator data had an invalid format", result.Failure.Message); 1095Assert.StartsWith("The credential public key algorithm does not match any of the supported algorithms", result.Failure.Message); 1109Assert.StartsWith("The attestation statement was not valid", result.Failure.Message); 1125Assert.StartsWith("Expected the credential ID to have a length between 1 and 1023 bytes", result.Failure.Message); 1144result.Failure.Message); 1158Assert.StartsWith("The credential is already registered for a user", result.Failure.Message);