-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into feat/#133-bucket-detail-fe
Change-Id: I0fb3dced24bbb6c92653ac1d2411c469dbc4b392
- Loading branch information
Showing
72 changed files
with
2,129 additions
and
428 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
39 changes: 39 additions & 0 deletions
39
backend/src/main/java/com/ggums/ggumtle/controller/OAuthController.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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package com.ggums.ggumtle.controller; | ||
|
||
import com.ggums.ggumtle.common.response.Response; | ||
import com.ggums.ggumtle.dto.request.OAuthJoinRequestDto; | ||
import com.ggums.ggumtle.service.OAuth.GoogleService; | ||
import com.ggums.ggumtle.service.OAuth.KakaoService; | ||
import jakarta.servlet.http.HttpServletResponse; | ||
import jakarta.validation.Valid; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.web.bind.annotation.*; | ||
|
||
@RestController | ||
@RequiredArgsConstructor | ||
@RequestMapping("/api/oauth") | ||
public class OAuthController { | ||
|
||
private final KakaoService kakaoService; | ||
private final GoogleService googleService; | ||
|
||
@GetMapping("/kakao/{authorizationCode}") | ||
public Response kakaoLogin(HttpServletResponse response, @PathVariable String authorizationCode){ | ||
return new Response("login", kakaoService.kakaoLogin(response, authorizationCode)); | ||
} | ||
|
||
@PostMapping("/kakao") | ||
public Response kakaoJoin(@Valid @RequestBody OAuthJoinRequestDto requestDto){ | ||
return new Response("message", kakaoService.kakaoJoin(requestDto)); | ||
} | ||
|
||
@GetMapping("/google/{authenticationCode}") | ||
public Response googleLogin(HttpServletResponse response, @PathVariable String authenticationCode){ | ||
return new Response("login", googleService.googleLogin(response, authenticationCode)); | ||
} | ||
|
||
@PostMapping("/google") | ||
public Response googleJoin(@Valid @RequestBody OAuthJoinRequestDto requestDto){ | ||
return new Response("message", googleService.googleJoin(requestDto)); | ||
} | ||
} |
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
34 changes: 34 additions & 0 deletions
34
backend/src/main/java/com/ggums/ggumtle/dto/request/OAuthJoinRequestDto.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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package com.ggums.ggumtle.dto.request; | ||
|
||
import com.ggums.ggumtle.entity.Gender; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import jakarta.validation.constraints.NotNull; | ||
import jakarta.validation.constraints.Pattern; | ||
import jakarta.validation.constraints.Size; | ||
import lombok.Getter; | ||
|
||
import java.time.LocalDate; | ||
import java.util.List; | ||
|
||
@Getter | ||
public class OAuthJoinRequestDto { | ||
|
||
private String authorizationCode; | ||
|
||
@NotNull(message = "ํ์ ์ ๋ณด์ ๋๋ค.") | ||
@Size(max = 50, message = "notEmailFormat") | ||
@Pattern(regexp = "^[a-zA-Z0-9.!#$%&โ*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\\.[a-zA-Z0-9-]+)*$", message = "notEmailFormat") | ||
private String userEmail; | ||
|
||
@Schema(example = "ํ์ดํ 10๊ธฐ") | ||
@Size(max = 255, message = "๋๋ค์ ํฌ๊ธฐ๊ฐ ์ด๊ณผํ์์ต๋๋ค.") | ||
private String userNickname; | ||
|
||
@Schema(example = "2023-07-03") | ||
private LocalDate birthDate; | ||
@Schema(example = "Male") | ||
private Gender gender; | ||
|
||
@Schema(example = "[\"์ทจ์ \",\"์ฌํ\",\"์ธ๊ฐ๊ด๊ณ\"]") | ||
private List<String> category; | ||
} |
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
Oops, something went wrong.