-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hotfix: oauth member info request http 메서드 변경
- Loading branch information
1 parent
be58a1b
commit 7451148
Showing
3 changed files
with
14 additions
and
15 deletions.
There are no files selected for viewing
12 changes: 6 additions & 6 deletions
12
src/main/java/com/baro/auth/infra/oauth/google/GoogleRequestApi.java
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,21 +1,21 @@ | ||
package com.baro.auth.infra.oauth.google; | ||
|
||
import static org.springframework.http.HttpHeaders.AUTHORIZATION; | ||
import static org.springframework.http.MediaType.APPLICATION_FORM_URLENCODED_VALUE; | ||
|
||
import com.baro.auth.infra.oauth.google.dto.GoogleMemberResponse; | ||
import com.baro.auth.infra.oauth.google.dto.GoogleTokenResponse; | ||
import java.util.Map; | ||
import org.springframework.web.bind.annotation.RequestHeader; | ||
import org.springframework.web.bind.annotation.RequestParam; | ||
import org.springframework.web.service.annotation.GetExchange; | ||
import org.springframework.web.service.annotation.PostExchange; | ||
|
||
import java.util.Map; | ||
|
||
import static org.springframework.http.HttpHeaders.AUTHORIZATION; | ||
import static org.springframework.http.MediaType.APPLICATION_FORM_URLENCODED_VALUE; | ||
|
||
public interface GoogleRequestApi { | ||
|
||
@PostExchange(url = "https://oauth2.googleapis.com/token", contentType = APPLICATION_FORM_URLENCODED_VALUE) | ||
GoogleTokenResponse requestToken(@RequestParam Map<String, String> params); | ||
|
||
@PostExchange(url = "https://www.googleapis.com/oauth2/v2/userinfo", contentType = APPLICATION_FORM_URLENCODED_VALUE) | ||
@GetExchange(url = "https://www.googleapis.com/oauth2/v2/userinfo") | ||
GoogleMemberResponse requestMemberInfo(@RequestHeader(name = AUTHORIZATION) String accessToken); | ||
} |
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
12 changes: 6 additions & 6 deletions
12
src/main/java/com/baro/auth/infra/oauth/naver/NaverRequestApi.java
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,21 +1,21 @@ | ||
package com.baro.auth.infra.oauth.naver; | ||
|
||
import static org.springframework.http.HttpHeaders.AUTHORIZATION; | ||
import static org.springframework.http.MediaType.APPLICATION_FORM_URLENCODED_VALUE; | ||
|
||
import com.baro.auth.infra.oauth.naver.dto.NaverMemberResponse; | ||
import com.baro.auth.infra.oauth.naver.dto.NaverTokenResponse; | ||
import java.util.Map; | ||
import org.springframework.web.bind.annotation.RequestHeader; | ||
import org.springframework.web.bind.annotation.RequestParam; | ||
import org.springframework.web.service.annotation.GetExchange; | ||
import org.springframework.web.service.annotation.PostExchange; | ||
|
||
import java.util.Map; | ||
|
||
import static org.springframework.http.HttpHeaders.AUTHORIZATION; | ||
import static org.springframework.http.MediaType.APPLICATION_FORM_URLENCODED_VALUE; | ||
|
||
public interface NaverRequestApi { | ||
|
||
@PostExchange(url = "https://nid.naver.com/oauth2.0/token", contentType = APPLICATION_FORM_URLENCODED_VALUE) | ||
NaverTokenResponse requestToken(@RequestParam Map<String, String> params); | ||
|
||
@PostExchange(url = "https://openapi.naver.com/v1/nid/me", contentType = APPLICATION_FORM_URLENCODED_VALUE) | ||
@GetExchange(url = "https://openapi.naver.com/v1/nid/me") | ||
NaverMemberResponse requestMemberInfo(@RequestHeader(name = AUTHORIZATION) String accessToken); | ||
} |