This repository was archived by the owner on Jul 7, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOAuthWebClientConfig.kt
More file actions
46 lines (41 loc) · 1.43 KB
/
OAuthWebClientConfig.kt
File metadata and controls
46 lines (41 loc) · 1.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package com.asap.client.oauth
import org.springframework.beans.factory.annotation.Qualifier
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
import org.springframework.http.MediaType
import org.springframework.web.reactive.function.client.WebClient
@Configuration
class OAuthWebClientConfig {
@Bean
@Qualifier("kakaoWebClient")
fun kakaoWebClient(): WebClient =
WebClient
.builder()
.baseUrl("https://kapi.kakao.com")
.defaultHeader("Content-Type", MediaType.APPLICATION_JSON_VALUE)
.build()
@Bean
@Qualifier("googleWebClient")
fun googleWebClient(): WebClient =
WebClient
.builder()
.baseUrl("https://www.googleapis.com")
.defaultHeader("Content-Type", MediaType.APPLICATION_JSON_VALUE)
.build()
@Bean
@Qualifier("naverWebClient")
fun naverWebClient(): WebClient =
WebClient
.builder()
.baseUrl("https://openapi.naver.com")
.defaultHeader("Content-Type", MediaType.APPLICATION_JSON_VALUE)
.build()
@Bean
@Qualifier("getNaverAccessTokenWebClient")
fun getNaverAccessTokenWebClient(): WebClient =
WebClient
.builder()
.baseUrl("https://nid.naver.com")
.defaultHeader("Content-Type", MediaType.APPLICATION_JSON_VALUE)
.build()
}