Skip to content

Commit

Permalink
feat: final 키워드 적용하여 요청 값 불변성 보장 #8
Browse files Browse the repository at this point in the history
  • Loading branch information
PgmJun committed Jan 19, 2024
1 parent 8453ba3 commit 74b8a74
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class AuthController {
@Operation(summary = "OAuth2 소셜 회원가입")
@ResponseStatus(HttpStatus.OK)
@PostMapping("/auth/signup")
public ApiResponse<?> signUp(@Valid @RequestBody SignUpRequest request, HttpServletResponse response) {
public ApiResponse<?> signUp(@Valid @RequestBody final SignUpRequest request, HttpServletResponse response) {
AuthService authService = authServiceProvider.getAuthService(request.getSocialType());
Long memberId = authService.signUp(request);

Expand All @@ -49,7 +49,7 @@ public ApiResponse<?> signUp(@Valid @RequestBody SignUpRequest request, HttpServ
@Operation(summary = "OAuth2 소셜 로그인")
@ResponseStatus(HttpStatus.OK)
@PostMapping("/auth/login")
public ApiResponse<?> login(@Valid @RequestBody LoginRequest request, HttpServletResponse response) {
public ApiResponse<?> login(@Valid @RequestBody final LoginRequest request, HttpServletResponse response) {
AuthService authService = authServiceProvider.getAuthService(request.getSocialType());
Long memberId = authService.login(request);

Expand All @@ -62,7 +62,7 @@ public ApiResponse<?> login(@Valid @RequestBody LoginRequest request, HttpServle
@Auth
@ResponseStatus(HttpStatus.OK)
@PostMapping("/auth/logout")
public ApiResponse<String> logout(@MemberId Long memberId) {
public ApiResponse<String> logout(@MemberId final Long memberId) {
commonAuthService.logout(memberId);

return ApiResponse.success();
Expand All @@ -71,7 +71,8 @@ public ApiResponse<String> logout(@MemberId Long memberId) {
@Operation(summary = "JWT 토큰 갱신")
@ResponseStatus(HttpStatus.OK)
@PostMapping("/auth/reissue")
public ApiResponse<?> reissue(@CookieValue String accessToken, @CookieValue String refreshToken, HttpServletResponse response) {
public ApiResponse<?> reissue(@CookieValue final String accessToken, @CookieValue final String refreshToken,
HttpServletResponse response) {
TokenVO tokenVO = TokenVO.of(accessToken, refreshToken);
addTokensToCookie(createTokenService.reissueToken(tokenVO), response);

Expand Down

0 comments on commit 74b8a74

Please sign in to comment.