add passkey & totp
This commit is contained in:
1 parent
70f6b52577
commit
1d06bbd482
13 files changed
+9114
-4
No files matched your search
@@ -0,0 +1,20 @@
|
||||
namespace Jiaowu.Api.Domain.Identity;
|
||||
|
||||
/// <summary>Public WebAuthn credential material. Private keys never leave the authenticator.</summary>
|
||||
public sealed class PasskeyCredential
|
||||
{
|
||||
public Guid Id { get; set; } = Guid.NewGuid();
|
||||
public Guid UserId { get; set; }
|
||||
public required string CredentialId { get; set; }
|
||||
/// <summary>SHA-256 of the raw credential ID, used for a portable unique index.</summary>
|
||||
public required string CredentialIdHash { get; set; }
|
||||
public required byte[] PublicKey { get; set; }
|
||||
public uint SignatureCounter { get; set; }
|
||||
public required string FriendlyName { get; set; }
|
||||
public string? Transports { get; set; }
|
||||
public bool IsBackupEligible { get; set; }
|
||||
public bool IsBackedUp { get; set; }
|
||||
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
||||
public DateTime? LastUsedAt { get; set; }
|
||||
public ApplicationUser? User { get; set; }
|
||||
}
|
||||
Reference in new issue
Block a user