diff --git a/Projects/Core/JwtStore/Sources/JwtStoreAssembly.swift b/Projects/Core/JwtStore/Sources/JwtStoreAssembly.swift index 9a7e93ba..4cd3c860 100644 --- a/Projects/Core/JwtStore/Sources/JwtStoreAssembly.swift +++ b/Projects/Core/JwtStore/Sources/JwtStoreAssembly.swift @@ -6,6 +6,7 @@ public final class JwtStoreAssembly: Assembly { public func assemble(container: Container) { container.register(JwtStore.self) { _ in KeychainJwtStore() - }.inObjectScope(.container) + } + .inObjectScope(.container) } } diff --git a/Projects/Core/JwtStore/Sources/KeychainJwtStore.swift b/Projects/Core/JwtStore/Sources/KeychainJwtStore.swift index f4e60562..222b046a 100644 --- a/Projects/Core/JwtStore/Sources/KeychainJwtStore.swift +++ b/Projects/Core/JwtStore/Sources/KeychainJwtStore.swift @@ -1,7 +1,7 @@ import Foundation import JwtStoreInterface -struct KeychainJwtStore: JwtStore { +final class KeychainJwtStore: JwtStore { func save(property: JwtStoreProperties, value: String) { let query: NSDictionary = [ kSecClass: kSecClassGenericPassword, diff --git a/Projects/Core/KeyValueStore/Sources/KeyValueStoreAssembly.swift b/Projects/Core/KeyValueStore/Sources/KeyValueStoreAssembly.swift index e5a23dfd..8f9630b8 100644 --- a/Projects/Core/KeyValueStore/Sources/KeyValueStoreAssembly.swift +++ b/Projects/Core/KeyValueStore/Sources/KeyValueStoreAssembly.swift @@ -7,6 +7,7 @@ public final class KeyValueStoreAssembly: Assembly { public func assemble(container: Container) { container.register(KeyValueStore.self) { _ in UserDefaultsKeyValueStore(userDefaults: .standard) - }.inObjectScope(.container) + } + .inObjectScope(.container) } } diff --git a/Projects/Domain/AuthDomain/Sources/Assembly/AuthDomainAssembly.swift b/Projects/Domain/AuthDomain/Sources/Assembly/AuthDomainAssembly.swift index 371b39a9..98b422d1 100644 --- a/Projects/Domain/AuthDomain/Sources/Assembly/AuthDomainAssembly.swift +++ b/Projects/Domain/AuthDomain/Sources/Assembly/AuthDomainAssembly.swift @@ -14,10 +14,12 @@ public final class AuthDomainAssembly: Assembly { keyValueStore: resolver.resolve(KeyValueStore.self)! ) } + .inObjectScope(.container) container.register(LocalAuthDataSource.self) { resolver in LocalAuthDataSourceImpl(jwtStore: resolver.resolve(JwtStore.self)!) } + .inObjectScope(.container) // MARK: - Repository container.register(AuthRepository.self) { resolver in @@ -26,6 +28,7 @@ public final class AuthDomainAssembly: Assembly { localAuthDataSource: resolver.resolve(LocalAuthDataSource.self)! ) } + .inObjectScope(.container) // MARK: - UseCase container.register(SigninUseCase.self) { resolver in diff --git a/Projects/Domain/AuthDomain/Sources/DataSource/LocalAuthDataSourceImpl.swift b/Projects/Domain/AuthDomain/Sources/DataSource/LocalAuthDataSourceImpl.swift index b3ab6736..736c3251 100644 --- a/Projects/Domain/AuthDomain/Sources/DataSource/LocalAuthDataSourceImpl.swift +++ b/Projects/Domain/AuthDomain/Sources/DataSource/LocalAuthDataSourceImpl.swift @@ -2,7 +2,7 @@ import AuthDomainInterface import Combine import JwtStoreInterface -struct LocalAuthDataSourceImpl: LocalAuthDataSource { +final class LocalAuthDataSourceImpl: LocalAuthDataSource { private let jwtStore: any JwtStore init(jwtStore: any JwtStore) { diff --git a/Projects/Domain/AuthDomain/Sources/Repository/AuthRepositoryImpl.swift b/Projects/Domain/AuthDomain/Sources/Repository/AuthRepositoryImpl.swift index 153425dc..6c5e37f6 100644 --- a/Projects/Domain/AuthDomain/Sources/Repository/AuthRepositoryImpl.swift +++ b/Projects/Domain/AuthDomain/Sources/Repository/AuthRepositoryImpl.swift @@ -1,7 +1,7 @@ import AuthDomainInterface import Combine -struct AuthRepositoryImpl: AuthRepository { +final class AuthRepositoryImpl: AuthRepository { private let remoteAuthDataSource: any RemoteAuthDataSource private let localAuthDataSource: any LocalAuthDataSource