-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Feat/#95] AuthRepository에 OAuth 처리 로직 추가
- Loading branch information
Showing
8 changed files
with
110 additions
and
38 deletions.
There are no files selected for viewing
43 changes: 43 additions & 0 deletions
43
HMH_Tuist_iOS/Projects/Data/Sources/Model/OAuthProviderType.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,43 @@ | ||
// | ||
// OAuthProviderType.swift | ||
// Data | ||
// | ||
// Created by 류희재 on 11/2/24. | ||
// Copyright © 2024 HMH-iOS. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
import Domain | ||
import Networks | ||
|
||
/** | ||
- description: OAuth 서비스를 제공하는 제공자 종류 | ||
우리 서비스의 경우 Apple, Kakao 서비스 사용 | ||
*/ | ||
|
||
public enum OAuthProvider: OAuthProviderType { | ||
case kakao | ||
case apple | ||
|
||
public var socialPlatform: String { | ||
switch self { | ||
case .kakao: | ||
return "KAKAO" | ||
case .apple: | ||
return "APPLE" | ||
} | ||
} | ||
|
||
public var service: OAuthServiceType { | ||
switch self { | ||
case .kakao: | ||
return OAuthKakaoService() | ||
case .apple: | ||
return OAuthAppleService() | ||
} | ||
} | ||
} | ||
|
||
|
||
|
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
13 changes: 13 additions & 0 deletions
13
HMH_Tuist_iOS/Projects/Domain/Sources/Entity/Auth/OAuthProviderType.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,13 @@ | ||
// | ||
// OAuthProviderType.swift | ||
// Domain | ||
// | ||
// Created by 류희재 on 11/2/24. | ||
// Copyright © 2024 HMH-iOS. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
public protocol OAuthProviderType { | ||
var socialPlatform: String { get } | ||
} |
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
52 changes: 26 additions & 26 deletions
52
...st_iOS/Projects/Modules/Networks/Sources/Service/OAuth/Foundation/OAuthProviderType.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 |
---|---|---|
@@ -1,29 +1,29 @@ | ||
//// | ||
//// OAuthProviderType.swift | ||
//// Networks | ||
//// | ||
//// Created by 류희재 on 10/31/24. | ||
//// Copyright © 2024 HMH-iOS. All rights reserved. | ||
//// | ||
// | ||
// OAuthProviderType.swift | ||
// Networks | ||
//import Foundation | ||
// | ||
// Created by 류희재 on 10/31/24. | ||
// Copyright © 2024 HMH-iOS. All rights reserved. | ||
///** | ||
// - description: OAuth 서비스를 제공하는 제공자 종류 | ||
// 우리 서비스의 경우 Apple, Kakao 서비스 사용 | ||
// */ | ||
// | ||
//enum OAuthProviderType: String, Hashable, CaseIterable { | ||
// case kakao | ||
// case apple | ||
// | ||
// var service: OAuthServiceType { | ||
// switch self { | ||
// case .kakao: | ||
// return OAuthKakaoService() | ||
// case .apple: | ||
// return OAuthAppleService() | ||
// } | ||
// } | ||
//} | ||
// | ||
|
||
import Foundation | ||
|
||
/** | ||
- description: OAuth 서비스를 제공하는 제공자 종류 | ||
우리 서비스의 경우 Apple, Kakao 서비스 사용 | ||
*/ | ||
|
||
enum OAuthProviderType: String, Hashable, CaseIterable { | ||
case kakao | ||
case apple | ||
|
||
var service: OAuthServiceType { | ||
switch self { | ||
case .kakao: | ||
return OAuthKakaoService() | ||
case .apple: | ||
return OAuthAppleService() | ||
} | ||
} | ||
} | ||
|
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