-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathAuthControllerDocs.java
More file actions
25 lines (21 loc) · 1.43 KB
/
AuthControllerDocs.java
File metadata and controls
25 lines (21 loc) · 1.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package com.example.umc9th.auth.controller;
import com.myApp.auth.dto.TokenDto;
import com.myApp.global.apiPayload.ApiResponse;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.web.bind.annotation.CookieValue;
import org.springframework.web.bind.annotation.RequestHeader;
@Tag(name = "Auth", description = "인증 관련 API")
public interface AuthControllerDocs {
@Operation(summary = "토큰 재발급", description = "Cookie에 있는 Refresh Token을 이용하여 새로운 Access Token을 발급합니다.")
ApiResponse<String> reissue(
@Parameter(description = "Refresh Token (HttpOnly Cookie)", required = true) @CookieValue("refresh_token") String refreshToken,
HttpServletResponse response);
@Operation(summary = "로그아웃", description = "사용자를 로그아웃 처리하고 Refresh Token Cookie를 삭제합니다.")
ApiResponse<String> logout(
@Parameter(description = "Access Token", required = true) @RequestHeader("Authorization") String accessToken,
@Parameter(description = "Refresh Token (HttpOnly Cookie)", required = true) @CookieValue("refresh_token") String refreshToken,
HttpServletResponse response);
}