-
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 pull request #16 from Interviewmate/feature/login
로그인 API Swagger 반영
- Loading branch information
Showing
3 changed files
with
59 additions
and
0 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
src/main/java/org/interviewmate/domain/auth/api/AuthApiController.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,25 @@ | ||
package org.interviewmate.domain.auth.api; | ||
|
||
import io.swagger.v3.oas.annotations.Operation; | ||
import io.swagger.v3.oas.annotations.tags.Tag; | ||
import lombok.RequiredArgsConstructor; | ||
import org.interviewmate.domain.auth.dto.LoginReq; | ||
import org.interviewmate.domain.auth.dto.LoginRes; | ||
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.RestController; | ||
|
||
@Tag(name = "인증 관련 API") | ||
@RestController | ||
@RequestMapping("/auth") | ||
@RequiredArgsConstructor | ||
public class AuthApiController { | ||
|
||
@Operation(summary = "로그인 API", description = "필요한 정보를 받아 로그인 진행") | ||
@PostMapping("/login") | ||
public LoginRes signUp(@RequestBody LoginReq loginReq) { | ||
return null; | ||
} | ||
|
||
} |
16 changes: 16 additions & 0 deletions
16
src/main/java/org/interviewmate/domain/auth/dto/LoginReq.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,16 @@ | ||
package org.interviewmate.domain.auth.dto; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import java.util.List; | ||
import lombok.Getter; | ||
|
||
@Schema(name = "로그인 Request", description = "로그인에 필요한 정보") | ||
@Getter | ||
public class LoginReq { | ||
|
||
@Schema(description = "이메일", example = "[email protected]") | ||
private String email; | ||
@Schema(description = "비밀번호", example = "Moamoa0302!") | ||
private String password; | ||
|
||
} |
18 changes: 18 additions & 0 deletions
18
src/main/java/org/interviewmate/domain/auth/dto/LoginRes.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,18 @@ | ||
package org.interviewmate.domain.auth.dto; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.Getter; | ||
|
||
@Schema(name = "로그인 Response", description = "로그인 결과에 대한 정보") | ||
@Getter | ||
public class LoginRes { | ||
|
||
@Schema(description = "유저 식별자", example = "1") | ||
private Long userId; | ||
@Schema(description = "Access 토큰", example = "eyJ0eXBlIjoiand0IiwiYWxnIjoiSFMyNTYifQ.eyJpYXQiOjE2Nzk1NjYzOTEsImV4cCI6MTY3OTU2ODE5MSwidXNlcklkeCI6MjB9.-Ji4Cw5S8qGbCrNs9MlEyqACEIYH6qZKSsJRobFzY_w") | ||
private String accessToken; | ||
@Schema(description = "Refresh 토큰", example = "eyJ0eXBlIjoiand0IiwiYWxnIjoiSFMyNTYifQ.eyJpYXQiOjE2Nzk1NjYzOTEsImV4cCI6MTY4MDE3MTE5MX0.cRQqbqLYsbVfYUMj7WQd-IlhMl_-pEC-BOYrIA0TNPc") | ||
private String refreshToken; | ||
|
||
|
||
} |