Added the catalogue models and seed to support phase 4 of the POC prototype in the Persistence package.

This commit is contained in:
javier committed 2026-09-21 12:50:53 +02:00
1 parent 0dc3fe6bea
commit 95e0a455e8
14 files changed
+743 -9

No files matched your search

@@ -0,0 +1,29 @@
/// A `Sendable` snapshot of a WebAuthn credential registered to an account.
public struct Passkey: Sendable, Equatable {
// MARK: Properties
/// The credential's identifier, base64url-encoded without padding.
public let credentialID: String
/// The credential's public key, COSE-encoded.
public let publicKey: [UInt8]
/// The authenticator's signature counter as last seen; a lower one later on signals a cloned authenticator.
public let signCount: UInt32
/// The account the credential signs in.
public let user: User
// MARK: Initializers
public init(
credentialID: String,
publicKey: [UInt8],
signCount: UInt32,
user: User
) {
self.credentialID = credentialID
self.publicKey = publicKey
self.signCount = signCount
self.user = user
}
}