From f3a38e4b8822e6e865f6b08d90f26b673122f916 Mon Sep 17 00:00:00 2001 From: HoYeon Lee Date: Mon, 11 Nov 2024 19:11:57 +0900 Subject: [PATCH 1/3] =?UTF-8?q?DRAW-387-1=20fix:=20Google=20Login=20Ios=20?= =?UTF-8?q?=EC=A7=80=EC=9B=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../kotlin/com/xorker/draw/oauth/google/GoogleApiProperties.kt | 2 +- .../kotlin/com/xorker/draw/oauth/google/GoogleAuthService.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/adapter/oauth/src/main/kotlin/com/xorker/draw/oauth/google/GoogleApiProperties.kt b/adapter/oauth/src/main/kotlin/com/xorker/draw/oauth/google/GoogleApiProperties.kt index eb7a229d..21eb376c 100644 --- a/adapter/oauth/src/main/kotlin/com/xorker/draw/oauth/google/GoogleApiProperties.kt +++ b/adapter/oauth/src/main/kotlin/com/xorker/draw/oauth/google/GoogleApiProperties.kt @@ -4,5 +4,5 @@ import org.springframework.boot.context.properties.ConfigurationProperties @ConfigurationProperties("oauth.google") data class GoogleApiProperties( - val clientId: String, + val clientId: List, ) diff --git a/adapter/oauth/src/main/kotlin/com/xorker/draw/oauth/google/GoogleAuthService.kt b/adapter/oauth/src/main/kotlin/com/xorker/draw/oauth/google/GoogleAuthService.kt index 083254f9..f947d4d4 100644 --- a/adapter/oauth/src/main/kotlin/com/xorker/draw/oauth/google/GoogleAuthService.kt +++ b/adapter/oauth/src/main/kotlin/com/xorker/draw/oauth/google/GoogleAuthService.kt @@ -13,7 +13,7 @@ internal class GoogleAuthService( ) { private val idTokenVerifier = GoogleIdTokenVerifier.Builder(NetHttpTransport(), GsonFactory.getDefaultInstance()) - .setAudience(listOf(googleApiProperties.clientId)) + .setAudience(googleApiProperties.clientId) .build() fun getPlatformUserId(token: String): String { From 0f8abff8052765a7ead3432daa04027557d59a92 Mon Sep 17 00:00:00 2001 From: HoYeon Lee Date: Mon, 11 Nov 2024 19:31:22 +0900 Subject: [PATCH 2/3] DRAW-440 style: ktlint --- core/src/main/kotlin/com/xorker/draw/user/UserService.kt | 1 - 1 file changed, 1 deletion(-) diff --git a/core/src/main/kotlin/com/xorker/draw/user/UserService.kt b/core/src/main/kotlin/com/xorker/draw/user/UserService.kt index f07cb2ab..ffd8b077 100644 --- a/core/src/main/kotlin/com/xorker/draw/user/UserService.kt +++ b/core/src/main/kotlin/com/xorker/draw/user/UserService.kt @@ -1,6 +1,5 @@ package com.xorker.draw.user -import com.xorker.draw.exception.NotFoundUserException import org.springframework.stereotype.Service @Service From 408bd4477ab3b8bc3412b410d96914752e181030 Mon Sep 17 00:00:00 2001 From: HoYeon Lee Date: Mon, 11 Nov 2024 19:41:52 +0900 Subject: [PATCH 3/3] =?UTF-8?q?DRAW-440=20fix:=20=EB=B2=84=EA=B7=B8=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/xorker/draw/websocket/handler/QuickWebSocketHandler.kt | 3 +++ .../com/xorker/draw/websocket/handler/RoomWebSocketHandler.kt | 3 +++ 2 files changed, 6 insertions(+) diff --git a/app/websocket/src/main/kotlin/com/xorker/draw/websocket/handler/QuickWebSocketHandler.kt b/app/websocket/src/main/kotlin/com/xorker/draw/websocket/handler/QuickWebSocketHandler.kt index 924535f4..f3565e71 100644 --- a/app/websocket/src/main/kotlin/com/xorker/draw/websocket/handler/QuickWebSocketHandler.kt +++ b/app/websocket/src/main/kotlin/com/xorker/draw/websocket/handler/QuickWebSocketHandler.kt @@ -5,6 +5,7 @@ import com.xorker.draw.auth.token.TokenUseCase import com.xorker.draw.mafia.MafiaGameUseCase import com.xorker.draw.mafia.UserConnectionUseCase import com.xorker.draw.mafia.WaitingQueueUseCase +import com.xorker.draw.user.UserUseCase import com.xorker.draw.websocket.WebSocketRouter import com.xorker.draw.websocket.exception.WebSocketExceptionHandler import com.xorker.draw.websocket.message.request.WebSocketRequest @@ -22,6 +23,7 @@ internal class QuickWebSocketHandler( tokenUseCase: TokenUseCase, gameUseCase: MafiaGameUseCase, webSocketExceptionHandler: WebSocketExceptionHandler, + userUseCase: UserUseCase, private val userConnectionUseCase: UserConnectionUseCase, private val router: WebSocketRouter, private val waitingQueueUseCase: WaitingQueueUseCase, @@ -32,6 +34,7 @@ internal class QuickWebSocketHandler( tokenUseCase, gameUseCase, webSocketExceptionHandler, + userUseCase, ) { override fun afterConnect(session: Session) { waitingQueueUseCase.enqueue(session.user, session.locale) diff --git a/app/websocket/src/main/kotlin/com/xorker/draw/websocket/handler/RoomWebSocketHandler.kt b/app/websocket/src/main/kotlin/com/xorker/draw/websocket/handler/RoomWebSocketHandler.kt index f4a64e7e..08c28819 100644 --- a/app/websocket/src/main/kotlin/com/xorker/draw/websocket/handler/RoomWebSocketHandler.kt +++ b/app/websocket/src/main/kotlin/com/xorker/draw/websocket/handler/RoomWebSocketHandler.kt @@ -5,6 +5,7 @@ import com.xorker.draw.auth.token.TokenUseCase import com.xorker.draw.mafia.MafiaGameUseCase import com.xorker.draw.mafia.UserConnectionUseCase import com.xorker.draw.room.RoomId +import com.xorker.draw.user.UserUseCase import com.xorker.draw.websocket.WebSocketRouter import com.xorker.draw.websocket.exception.WebSocketExceptionHandler import com.xorker.draw.websocket.message.request.WebSocketRequest @@ -22,6 +23,7 @@ internal class RoomWebSocketHandler( tokenUseCase: TokenUseCase, gameUseCase: MafiaGameUseCase, webSocketExceptionHandler: WebSocketExceptionHandler, + userUseCase: UserUseCase, private val userConnectionUseCase: UserConnectionUseCase, private val router: WebSocketRouter, ) : BaseWebSocketHandler( @@ -31,6 +33,7 @@ internal class RoomWebSocketHandler( tokenUseCase, gameUseCase, webSocketExceptionHandler, + userUseCase, ) { override fun afterConnect(session: Session) { userConnectionUseCase.connectUser(