Files
ios/BitwardenShared/UI/Auth/Utilities/UserVerificationHelperFactory.swift
2025-10-06 15:18:35 -05:00

29 lines
952 B
Swift

import BitwardenKit
/// A factory protocol to create `UserVerificationHelper`s.
protocol UserVerificationHelperFactory {
func create() -> UserVerificationHelper
}
/// The default implementation for `UserVerificationHelperFactory`.
struct DefaultUserVerificationHelperFactory: UserVerificationHelperFactory {
// MARK: Properties
/// The repository used by the application to manage auth data for the UI layer.
let authRepository: AuthRepository
/// The service used by the application to report non-fatal errors.
let errorReporter: ErrorReporter
/// The service used by the application to evaluate local auth policies.
let localAuthService: LocalAuthService
// MARK: Methods
func create() -> UserVerificationHelper {
DefaultUserVerificationHelper(
authRepository: authRepository,
errorReporter: errorReporter,
localAuthService: localAuthService,
)
}
}