Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Step3 #434

Open
wants to merge 38 commits into
base: main
Choose a base branch
from
Open

Step3 #434

Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
774bbff
Update README.md
eunsoni Jul 25, 2024
5d1bd22
step0
eunsoni Jul 25, 2024
419033c
Merge pull request #1 from eunsoni/step0
eunsoni Jul 26, 2024
8a612db
Update README.md
eunsoni Jul 26, 2024
f341b84
경북대 BE_김은선 5주차 과제 (0단계) (#235)
eunsoni Jul 26, 2024
24ea912
카카오 로그인 api 테스트 및 시크릿키 관리
eunsoni Jul 27, 2024
2532a37
feat: Add Kakao login button
eunsoni Jul 27, 2024
f8ce4ba
feat: Add Kakao login Controller
eunsoni Jul 27, 2024
819fb3b
feat: Implement function to get token using authorization code
eunsoni Jul 27, 2024
25c0f52
feat: Implement function to go to home page after successful e-mail e…
eunsoni Jul 27, 2024
bd31dcd
Merge pull request #2 from eunsoni/step1
eunsoni Jul 27, 2024
a7b13b9
test: Add KakaoControllerTest
eunsoni Jul 27, 2024
24fb815
Merge pull request #3 from eunsoni/step1
eunsoni Jul 27, 2024
357eba9
테스트 코드에 주석메세지 추가
eunsoni Jul 27, 2024
f14fe59
Merge pull request #4 from eunsoni/step1
eunsoni Jul 27, 2024
7b8d9eb
Merge branch 'eunsoni' into main
eunsoni Jul 27, 2024
41355da
Update README.md
eunsoni Jul 27, 2024
a72e171
feat: Implement function to order item and Reduce the quantity
eunsoni Jul 27, 2024
13fc9b4
fix: 위시리스트 옵션 필드 삭제 및 서비스, 클라이언트 수정
eunsoni Jul 27, 2024
8759dec
feat: Implement fuction to remove the product from the wishlist when …
eunsoni Jul 27, 2024
525c1c5
feat: Implement function to send message when odering a product
eunsoni Jul 27, 2024
f22343c
경북대 BE_김은선 5주차 과제 (1단계) (#339)
eunsoni Jul 27, 2024
45adeff
Merge pull request #5 from eunsoni/step2
eunsoni Jul 29, 2024
161085f
fix: reflect feedback(to save refresh token)
eunsoni Jul 29, 2024
2343d2f
feat: Implement to send a kakaotalk
eunsoni Jul 29, 2024
432d91c
fix: add Transactional annotation
eunsoni Jul 29, 2024
92a2595
fix: Reflect Feedback(add function to test db)
eunsoni Jul 29, 2024
710c5f3
fix: set prefix path
eunsoni Jul 29, 2024
571ebd4
fix: add code, url to application-secret.properties
eunsoni Jul 29, 2024
f4707ae
fix: url을 properties에서 받도록 수정
eunsoni Jul 29, 2024
2b3f08d
Merge branch 'eunsoni' into step2
eunsoni Jul 29, 2024
7826bb8
Update README.md
eunsoni Jul 30, 2024
7e879af
Merge pull request #6 from eunsoni/step2
eunsoni Jul 30, 2024
df297ef
fix: 상품 목록 페이지 반환 객체 map에서 dto로 변환
eunsoni Jul 30, 2024
9c86ee9
fix: 위시리스트 목록 페이지 컨트롤러 반환 객체 map에서 dto로 변환 및 위시리스트 삭제기능 에러 해결
eunsoni Jul 30, 2024
b3cb64e
fix: API 명세(Swagger UI)를 위한 컨트롤러 수정
eunsoni Jul 30, 2024
70c216d
feat: api 명세 문서(.yaml)로 작성
eunsoni Jul 30, 2024
209f58c
fix: Reflect Feedback
eunsoni Aug 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
카카오 로그인 api 테스트 및 시크릿키 관리
eunsoni committed Jul 27, 2024
commit 24ea912a85e309c7a292c411c7624a40363e604d
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -4,6 +4,8 @@ build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/
application-private.properties
application-test.properties

### STS ###
.apt_generated
2 changes: 2 additions & 0 deletions src/main/java/gift/Application.java
Original file line number Diff line number Diff line change
@@ -2,7 +2,9 @@

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.ConfigurationPropertiesScan;

@ConfigurationPropertiesScan
@SpringBootApplication
public class Application {
public static void main(String[] args) {
49 changes: 49 additions & 0 deletions src/test/java/gift/RestTemplateTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
package gift;

import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.MediaType;
import org.springframework.http.RequestEntity;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.web.client.RestTemplate;

import java.net.URI;


@ConfigurationProperties("kakao")
record KakaoProperties(
String clientId,
String redirectUrl
){}

@ActiveProfiles("test")
@SpringBootTest
class RestTemplateTest {
private final RestTemplate client = new RestTemplateBuilder().build();

@Autowired
private KakaoProperties properties;

@ConfigurationProperties


@Test
void test1(){
var url = "https://kauth.kakao.com/oauth/token";
var code = "6mKKbQa2qRvriXvJ1E8AemtkmniawKWYS8xdEVv1th2NIqk-RUeatwAAAAQKPCQhAAABkO7cUP8e0jm_MNo9Pw";
var headers = new HttpHeaders();
headers.add(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_FORM_URLENCODED_VALUE);
var body = new LinkedMultiValueMap<String, String>();
body.add("grant_type", "authorization_code");
body.add("client_id", properties.clientId());
body.add("redirect_uri", properties.redirectUrl());
body.add("code", code);
var request = new RequestEntity<>(body, headers, HttpMethod.POST, URI.create(url));
}
}