Add native security key registration, reference import, and signing on macOS and iOS. Store references in Vault metadata and route authentication through connection, Assistant, MCP, and agent forwarding flows. Preserve signing cancellation and actionable authentication errors for security keys and Secure Enclave. Pin the released libssh2 forks as nested submodules and refresh package resolution.
24 lines
899 B
Swift
24 lines
899 B
Swift
import Foundation
|
|
|
|
/// A reference to a credential on a physical authenticator. Contains no private key.
|
|
public nonisolated struct SecurityKeyCredential: Codable, Hashable, Sendable {
|
|
public static let relyingParty = "termind.akinokaede.com"
|
|
public var credentialID: Data
|
|
public var publicKeyX963: Data
|
|
public enum UserVerification: String, Codable, CaseIterable, Sendable {
|
|
case required, preferred, discouraged
|
|
}
|
|
public var userVerification: UserVerification
|
|
public var requiresUserPresence: Bool
|
|
|
|
public init(
|
|
credentialID: Data, publicKeyX963: Data, userVerification: UserVerification = .preferred,
|
|
requiresUserPresence: Bool = true
|
|
) {
|
|
self.credentialID = credentialID
|
|
self.publicKeyX963 = publicKeyX963
|
|
self.userVerification = userVerification
|
|
self.requiresUserPresence = requiresUserPresence
|
|
}
|
|
}
|