Skip to content

Commit

Permalink
Revert to include R256 to support Windows Hellow in sample.
Browse files Browse the repository at this point in the history
  • Loading branch information
KristofferStrube committed Nov 20, 2023
1 parent 1883b40 commit 3a8d0ac
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
}
};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
namespace KristofferStrube.Blazor.WebAuthentication;

public class AuthenticatorResponse
/// <summary>
/// Authenticators respond to Relying Party requests by returning an object derived from the <see cref="AuthenticatorResponse"/> interface.
/// </summary>
/// <remarks><see href="https://www.w3.org/TR/webauthn-3/#authenticatorresponse">See the API definition here</see>.</remarks>
public abstract class AuthenticatorResponse
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
using Microsoft.JSInterop;

namespace KristofferStrube.Blazor.WebAuthentication;

/// <summary>
/// The PublicKeyCredential interface inherits from <see cref="Credential"/>, and contains the attributes that are returned to the caller when a new credential is created, or a new assertion is requested.
/// </summary>
/// <remarks><see href="https://www.w3.org/TR/webauthn-2/#publickeycredential">See the API definition here</see>.</remarks>
/// <remarks><see href="https://www.w3.org/TR/webauthn-3/#publickeycredential">See the API definition here</see>.</remarks>
public class PublicKeyCredential : Credential
{
protected readonly Lazy<Task<IJSObjectReference>> webAuthenticationHelperTask;
Expand Down

0 comments on commit 3a8d0ac

Please sign in to comment.