-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Refactor data scratch-authorization (#1809)
- Loading branch information
1 parent
6dbf8be
commit 458a12e
Showing
10 changed files
with
32 additions
and
12 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
test_runner/src/main/kotlin/ftl/adapter/GoogleUserAuthorizationRequest.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,10 @@ | ||
package ftl.adapter | ||
|
||
import ftl.adapter.google.UserAuth | ||
import ftl.data.UserAuthorization | ||
|
||
object GoogleUserAuthorizationRequest : | ||
UserAuthorization.Request, | ||
() -> Unit by { | ||
UserAuth().request() | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package ftl.data | ||
|
||
import ftl.adapter.GoogleUserAuthorizationRequest | ||
|
||
val requestUserAuthorization: UserAuthorization.Request get() = GoogleUserAuthorizationRequest | ||
|
||
object UserAuthorization { | ||
interface Request : () -> Unit | ||
} |
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,9 +1,9 @@ | ||
package ftl.domain | ||
|
||
import ftl.gc.UserAuth | ||
import ftl.data.requestUserAuthorization | ||
|
||
interface LoginGoogleAccount | ||
|
||
operator fun LoginGoogleAccount.invoke() { | ||
UserAuth().request() | ||
requestUserAuthorization() | ||
} |
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
4 changes: 2 additions & 2 deletions
4
...er/src/test/kotlin/ftl/gc/UserAuthTest.kt → ...kotlin/ftl/adapter/google/UserAuthTest.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