diff --git a/samples/KristofferStrube.Blazor.WebAuthentication.WasmExample/Pages/Index.razor.cs b/samples/KristofferStrube.Blazor.WebAuthentication.WasmExample/Pages/Index.razor.cs index 8c33c4e..9d852b2 100644 --- a/samples/KristofferStrube.Blazor.WebAuthentication.WasmExample/Pages/Index.razor.cs +++ b/samples/KristofferStrube.Blazor.WebAuthentication.WasmExample/Pages/Index.razor.cs @@ -53,10 +53,13 @@ private async Task CreateCredential() new PublicKeyCredentialParameters() { Type = PublicKeyCredentialType.PublicKey, - Alg = COSEAlgorithm.SHA_256 + Alg = COSEAlgorithm.RS256 } ], Timeout = 360000, + Hints = "client-device", + Attestation = "none", + AttestationFormats = ["tpm"] } }; diff --git a/src/KristofferStrube.Blazor.WebAuthentication/AuthenticatorResponse.cs b/src/KristofferStrube.Blazor.WebAuthentication/AuthenticatorResponse.cs index 7903a45..7e28fc0 100644 --- a/src/KristofferStrube.Blazor.WebAuthentication/AuthenticatorResponse.cs +++ b/src/KristofferStrube.Blazor.WebAuthentication/AuthenticatorResponse.cs @@ -1,5 +1,9 @@ namespace KristofferStrube.Blazor.WebAuthentication; -public class AuthenticatorResponse +/// +/// Authenticators respond to Relying Party requests by returning an object derived from the interface. +/// +/// See the API definition here. +public abstract class AuthenticatorResponse { } diff --git a/src/KristofferStrube.Blazor.WebAuthentication/Options/PublicKeyCredentialCreationOptions.cs b/src/KristofferStrube.Blazor.WebAuthentication/Options/PublicKeyCredentialCreationOptions.cs index 13c6ab1..0c0d0e3 100644 --- a/src/KristofferStrube.Blazor.WebAuthentication/Options/PublicKeyCredentialCreationOptions.cs +++ b/src/KristofferStrube.Blazor.WebAuthentication/Options/PublicKeyCredentialCreationOptions.cs @@ -18,4 +18,16 @@ public class PublicKeyCredentialCreationOptions [JsonPropertyName("timeout")] public ulong Timeout { get; set; } + + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("hints")] + public string? Hints { get; set; } + + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("attestation")] + public string? Attestation { get; set; } + + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("attestationFormats")] + public string[]? AttestationFormats { get; set; } } diff --git a/src/KristofferStrube.Blazor.WebAuthentication/PublicKeyCredential.cs b/src/KristofferStrube.Blazor.WebAuthentication/PublicKeyCredential.cs index 7060fc7..f7ee050 100644 --- a/src/KristofferStrube.Blazor.WebAuthentication/PublicKeyCredential.cs +++ b/src/KristofferStrube.Blazor.WebAuthentication/PublicKeyCredential.cs @@ -3,10 +3,11 @@ using Microsoft.JSInterop; namespace KristofferStrube.Blazor.WebAuthentication; + /// /// The PublicKeyCredential interface inherits from , and contains the attributes that are returned to the caller when a new credential is created, or a new assertion is requested. /// -/// See the API definition here. +/// See the API definition here. public class PublicKeyCredential : Credential { protected readonly Lazy> webAuthenticationHelperTask;