-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(MemberData): Add login method to MemberRepository
- Loading branch information
Showing
12 changed files
with
146 additions
and
20 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
Projects/DI/ContainerDIModule/Container/Sources/Contaner+Shared.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// | ||
// Contaner+Shared.swift | ||
// Container | ||
// | ||
// Created by DOYEON LEE on 8/14/24. | ||
// | ||
|
||
import Swinject | ||
|
||
import MemberDataInterface | ||
import MemberData | ||
|
||
public extension Container { | ||
static let shared: Container = { | ||
let container = Container() | ||
|
||
container.register(MemberRepository.self) { _ in | ||
MemberRepositoryImpl() | ||
} | ||
|
||
return container | ||
}() | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
Projects/Domain/MemberDomainModule/MemberUsecase/Sources/AppleLoginUsecase.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// | ||
// AppleLoginUsecase.swift | ||
// MemberUsecase | ||
// | ||
// Created by DOYEON LEE on 8/14/24. | ||
// | ||
|
||
import Container | ||
import MemberEntity | ||
import MemberDataInterface | ||
|
||
import Swinject | ||
import RxSwift | ||
|
||
public struct AppleLoginUsecase { | ||
// MARK: DTO | ||
public struct Param { | ||
let authorizationCode: String // TODO: 추후 가능하면 identityToken으로 변경 | ||
} | ||
|
||
public struct Result { | ||
|
||
} | ||
|
||
// MARK: Dependency | ||
let memberRepository = Container.shared.resolve(MemberRepository.self)! | ||
|
||
// MARK: Initializer | ||
public init() { } | ||
|
||
// MARK: Execute method | ||
public func execute(_ param: Param) -> Observable<Result> { | ||
let requestParam: LoginParam = .init( | ||
body: .json( | ||
.init( | ||
provider: .APPLE, | ||
code: param.authorizationCode | ||
) | ||
) | ||
) | ||
|
||
return memberRepository.login(requestParam) | ||
.map { _ in Result() } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
import ProjectDescription | ||
import ProjectDescriptionHelpers | ||
|
||
let project = Project.makeDomainModule(.member) | ||
let project = Project.makeDomainModule( | ||
.member, | ||
dependencies: [ | ||
.di(.container) | ||
] | ||
) |
10 changes: 10 additions & 0 deletions
10
Projects/Example/SignupExampleModule/SignupExample/SignupExample.entitlements
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>com.apple.developer.applesignin</key> | ||
<array> | ||
<string>Default</string> | ||
</array> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters