-
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.
Refactor | CAKK-81 | External 모듈, Client 모듈 통합
* Refactor | CAKK-81 | external 모듈에 client 이관 * Refactor | CAKK-81 | client 모듈 제거 및 의존성 수정 * Refactor | CAKK-81 | Vo 관련 패키지 수정 * Test | CAKK-81 | 테스트 코드 non-null 이슈 해결
- Loading branch information
Showing
45 changed files
with
147 additions
and
161 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
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
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
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 was deleted.
Oops, something went wrong.
23 changes: 0 additions & 23 deletions
23
cakk-client/src/main/java/com/cakk/client/config/RestClientConfig.java
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
cakk-client/src/main/java/com/cakk/client/vo/OidcPublicKey.java
This file was deleted.
Oops, something went wrong.
19 changes: 0 additions & 19 deletions
19
cakk-client/src/main/java/com/cakk/client/vo/OidcPublicKeyList.java
This file was deleted.
Oops, something went wrong.
30 changes: 0 additions & 30 deletions
30
cakk-client/src/main/java/com/cakk/client/web/AppleAuthClient.java
This file was deleted.
Oops, something went wrong.
30 changes: 0 additions & 30 deletions
30
cakk-client/src/main/java/com/cakk/client/web/KakaoAuthClient.java
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
25 changes: 25 additions & 0 deletions
25
cakk-external/src/main/kotlin/com/cakk/external/client/AppleAuthClient.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,25 @@ | ||
package com.cakk.external.client | ||
|
||
import com.cakk.common.enums.ReturnCode | ||
import com.cakk.common.exception.CakkException | ||
import org.springframework.beans.factory.annotation.Value | ||
import org.springframework.stereotype.Component | ||
import org.springframework.web.client.RestClient | ||
|
||
import com.cakk.external.vo.key.OidcPublicKeyList | ||
|
||
@Component | ||
class AppleAuthClient( | ||
private val restClient: RestClient, | ||
@Value("\${oauth.apple.public-key-url}") | ||
private val publicKeyUrl: String | ||
) { | ||
|
||
fun getPublicKeys(): OidcPublicKeyList { | ||
return restClient.get() | ||
.uri(publicKeyUrl) | ||
.retrieve() | ||
.body(OidcPublicKeyList::class.java) | ||
?: throw CakkException(ReturnCode.EXTERNAL_SERVER_ERROR) | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
cakk-external/src/main/kotlin/com/cakk/external/client/KakaoAuthClient.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,25 @@ | ||
package com.cakk.external.client | ||
|
||
import com.cakk.common.enums.ReturnCode | ||
import com.cakk.common.exception.CakkException | ||
import org.springframework.beans.factory.annotation.Value | ||
import org.springframework.stereotype.Component | ||
import org.springframework.web.client.RestClient | ||
|
||
import com.cakk.external.vo.key.OidcPublicKeyList | ||
|
||
@Component | ||
class KakaoAuthClient( | ||
private val restClient: RestClient, | ||
@Value("\${oauth.kakao.public-key-info}") | ||
private val publicKeyUrl: String | ||
) { | ||
|
||
fun getPublicKeys(): OidcPublicKeyList { | ||
return restClient.get() | ||
.uri(publicKeyUrl) | ||
.retrieve() | ||
.body(OidcPublicKeyList::class.java) | ||
?: throw CakkException(ReturnCode.EXTERNAL_SERVER_ERROR) | ||
} | ||
} |
File renamed without changes.
Oops, something went wrong.