-
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.
- Firebase 로그인 기능 제거 (기획 확인 됨) - 패키지 정리
- Loading branch information
Showing
11 changed files
with
55 additions
and
73 deletions.
There are no files selected for viewing
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
5 changes: 0 additions & 5 deletions
5
app/src/main/java/com/moyerun/moyeorun_android/login/LoginEvent.kt
This file was deleted.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
app/src/main/java/com/moyerun/moyeorun_android/login/LoginModule.kt
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
59 changes: 0 additions & 59 deletions
59
app/src/main/java/com/moyerun/moyeorun_android/login/LoginRepository.kt
This file was deleted.
Oops, something went wrong.
18 changes: 18 additions & 0 deletions
18
app/src/main/java/com/moyerun/moyeorun_android/login/data/LoginRepository.kt
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,18 @@ | ||
package com.moyerun.moyeorun_android.login.data | ||
|
||
import kotlinx.coroutines.CoroutineDispatcher | ||
import kotlinx.coroutines.Dispatchers | ||
import kotlinx.coroutines.withContext | ||
|
||
class LoginRepository( | ||
private val coroutineDispatcher: CoroutineDispatcher = Dispatchers.IO | ||
) { | ||
|
||
// Todo: 모여런 서버 붙일 때 반환 타입 조정 | ||
suspend fun signIn(idToken: String): LoginResponse { | ||
return withContext(coroutineDispatcher) { | ||
// Todo: 모여런 서버 signIn | ||
LoginResponse(TokenPair(Token("", ""), Token("", "")), true, "1234") | ||
} | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
app/src/main/java/com/moyerun/moyeorun_android/login/data/LoginResponse.kt
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,12 @@ | ||
package com.moyerun.moyeorun_android.login.data | ||
|
||
data class LoginResponse( | ||
val token: TokenPair, | ||
val isNewUser: Boolean, | ||
val userId: String | ||
) | ||
|
||
data class TokenPair( | ||
val accessToken: Token, | ||
val refreshToken: Token | ||
) |
6 changes: 6 additions & 0 deletions
6
app/src/main/java/com/moyerun/moyeorun_android/login/data/Token.kt
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,6 @@ | ||
package com.moyerun.moyeorun_android.login.data | ||
|
||
data class Token( | ||
val token: String, | ||
val expiresIn: String | ||
) |
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
5 changes: 5 additions & 0 deletions
5
app/src/main/java/com/moyerun/moyeorun_android/login/ui/LoginEvent.kt
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,5 @@ | ||
package com.moyerun.moyeorun_android.login.ui | ||
|
||
enum class LoginEvent { | ||
RegisteredUser, NewUser, Error | ||
} |
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