-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
540b87f
commit d6f929f
Showing
1 changed file
with
12 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,18 +35,26 @@ public class AuthController { | |
@PostMapping("/api/login/apple") | ||
@Operation(summary = "Apple Login") | ||
@io.swagger.v3.oas.annotations.parameters.RequestBody(description ="{user:testuser,userId:sdjahkfhkjdhsjafhksd,phonenumber:010-1234-1234,email:[email protected]}") | ||
public ResponseEntity<UserResponseDto.TokenInfo> getAppleToken(@RequestBody AppleUserDto appleUserDto) throws Exception{ | ||
public ResponseEntity<clutch.clutchserver.global.payload.ApiResponse> getAppleToken(@RequestBody AppleUserDto appleUserDto) throws Exception{ | ||
User appleInfo = oAuth2Service.getAppleInfo(appleUserDto); | ||
UserResponseDto.TokenInfo tokenDTO =securityService.appleLogin(appleInfo); | ||
return ResponseEntity.ok(tokenDTO); | ||
clutch.clutchserver.global.payload.ApiResponse apiResponse = clutch.clutchserver.global.payload.ApiResponse.builder() | ||
.check(true) | ||
.information(tokenDTO) | ||
.build(); | ||
return ResponseEntity.ok(apiResponse); | ||
} | ||
@PostMapping("/api/login/kakao") | ||
@Operation(summary = "Kakao Login") | ||
@io.swagger.v3.oas.annotations.parameters.RequestBody(description ="{user:testuser,userId:sdjahkfhkjdhsjafhksd,phonenumber:010-1234-1234,email:[email protected]}") | ||
public ResponseEntity<UserResponseDto.TokenInfo> getKToken(@RequestBody KakaoUserDto kakaoUserDto) throws Exception{ | ||
public ResponseEntity<clutch.clutchserver.global.payload.ApiResponse> getKToken(@RequestBody KakaoUserDto kakaoUserDto) throws Exception{ | ||
User kInfo = oAuth2Service.getKInfo(kakaoUserDto); | ||
UserResponseDto.TokenInfo tokenDTO =securityService.kakaoLogin(kInfo); | ||
return ResponseEntity.ok(tokenDTO); | ||
clutch.clutchserver.global.payload.ApiResponse apiResponse = clutch.clutchserver.global.payload.ApiResponse.builder() | ||
.check(true) | ||
.information(tokenDTO) | ||
.build(); | ||
return ResponseEntity.ok(apiResponse); | ||
} | ||
|
||
@PostMapping(value = "/api/auth/token/kakao") | ||
|