From ebd38393b7cb31709472bcc513a2a026ae975779 Mon Sep 17 00:00:00 2001 From: oxdjww Date: Fri, 5 Jul 2024 06:24:19 +0900 Subject: [PATCH] callback api --- .../com/hackathon/TimeLapse/oauth/AuthController.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/hackathon/TimeLapse/oauth/AuthController.java b/src/main/java/com/hackathon/TimeLapse/oauth/AuthController.java index fc4e370..0859bf0 100644 --- a/src/main/java/com/hackathon/TimeLapse/oauth/AuthController.java +++ b/src/main/java/com/hackathon/TimeLapse/oauth/AuthController.java @@ -1,21 +1,26 @@ package com.hackathon.TimeLapse.oauth; import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import lombok.RequiredArgsConstructor; @RestController @RequiredArgsConstructor -@RequestMapping("/api/auth") public class AuthController { private final OAuthLoginService oAuthLoginService; - @PostMapping("/kakao") + @PostMapping("/api/auth/kakao") public ResponseEntity loginKakao(@RequestBody KakaoLoginParams params) { return ResponseEntity.ok(oAuthLoginService.login(params)); } + + @GetMapping("/login/oauth2/code/kakao") + public ResponseEntity loginByKakao(@RequestParam final String code) { + return ResponseEntity.ok(code); + } }