Files
ios/BitwardenShared/Core/Auth/Models/Domain/DeviceAuthKeyKeychainMetadata.swift
bw-ghapp[bot] 2486ae44a5 Update SDK to f705e9b (3.0.0-6241-ba67235) (#2646)
Co-authored-by: bw-ghapp[bot] <178206702+bw-ghapp[bot]@users.noreply.github.com>
Co-authored-by: Carlos Gonçalves <cgoncalves@bitwarden.com>
2026-05-20 19:53:47 +01:00

44 lines
1.4 KiB
Swift

import Foundation
// MARK: - DeviceAuthKeyKeychainMetadata
/// Metadata needed for matching a request to the device passkey before decrypting the secret data.
public struct DeviceAuthKeyKeychainMetadata: Codable, Equatable, Sendable {
/// The unique identifier of the cipher associated with this device auth key.
public let cipherId: String
/// The unique identifier for this credential.
public let credentialId: Data
/// The relying party identifier, typically a domain name.
public let rpId: String
/// The user handle (user ID) as raw data.
public let userHandle: Data
/// The user's username or login name.
public let userName: String
/// Creates new device auth key metadata.
///
/// - Parameters:
/// - cipherId: The unique identifier of the cipher associated with this device auth key.
/// - credentialId: The unique identifier for this credential.
/// - rpId: The relying party identifier, typically a domain name.
/// - userHandle: The user handle (user ID) as raw data.
/// - userName: The user's username or login name.
public init(
cipherId: String,
credentialId: Data,
rpId: String,
userHandle: Data,
userName: String,
) {
self.cipherId = cipherId
self.credentialId = credentialId
self.rpId = rpId
self.userHandle = userHandle
self.userName = userName
}
}