Skip to content

Commit

Permalink
테스트 쿠키 url 로그인 제외 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
HwangHoYoon committed Jan 20, 2024
1 parent 483a312 commit b4b3bbd
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion server_config
16 changes: 16 additions & 0 deletions src/main/java/com/chwipoClova/user/controller/UserController.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.chwipoClova.common.response.CommonMsgResponse;
import com.chwipoClova.common.response.CommonResponse;
import com.chwipoClova.common.response.MessageCode;
import com.chwipoClova.common.utils.JwtUtil;
import com.chwipoClova.user.entity.User;
import com.chwipoClova.user.request.UserLoginReq;
import com.chwipoClova.user.request.UserLogoutReq;
Expand Down Expand Up @@ -35,6 +36,8 @@ public class UserController {

private final UserService userService;

private final JwtUtil jwtUtil;

@Operation(summary = "유저 정보 조회", description = "유저 정보 조회")
@GetMapping("/getUserInfo")
@ApiResponses(value = {
Expand Down Expand Up @@ -112,4 +115,17 @@ public CommonResponse logout(@RequestBody UserLogoutReq userLogoutReq,
) {
return userService.logout(response, userLogoutReq);
}
@Operation(summary = "쿠키테스트", description = "쿠키테스트")
@PostMapping("/cookie")
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = String.class)))
}
)
public CommonResponse cookie(@Parameter(hidden = true) HttpServletResponse response
) {

jwtUtil.setResonseJwtToken(response, "11234", "1232142421");
return new CommonResponse<>(MessageCode.OK.getCode(), null, MessageCode.OK.getMessage());
}

}

0 comments on commit b4b3bbd

Please sign in to comment.