Skip to content

Commit

Permalink
Merge pull request #26 from gooiman/docs/login-api
Browse files Browse the repository at this point in the history
docs: `/login` 엔드포인트 Swagger 설명
  • Loading branch information
EATSTEAK authored Sep 28, 2024
2 parents d86f201 + d2637ac commit be3d3ea
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import dev.gooiman.server.security.application.CustomAuthenticationService;
import dev.gooiman.server.security.application.dto.JwtResponseDto;
import dev.gooiman.server.security.application.dto.LoginRequestDto;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import java.util.UUID;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PathVariable;
Expand All @@ -15,11 +17,13 @@
@RestController
@RequiredArgsConstructor
@RequestMapping("/api/auth")
@Tag(name = "Authentication", description = "인증 처리 API")
public class AuthenticationController {

private final CustomAuthenticationService authenticationService;

@PostMapping("/login/{page_id}")
@Operation(summary = "로그인", description = "로그인을 수행합니다. 만약 한번도 로그인 한 적 없는 name으로 로그인을 시도할 경우 회원가입을 수행합니다.")
public ResponseDto<JwtResponseDto> signIn(@PathVariable("page_id") UUID pageId,
@RequestBody LoginRequestDto dto) {
return ResponseDto.ok(authenticationService.login(pageId, dto));
Expand Down

0 comments on commit be3d3ea

Please sign in to comment.