Skip to content

Commit

Permalink
Merge pull request #122 from swm-nodriversomabus/FIX-LOGOUT-LOGIN
Browse files Browse the repository at this point in the history
fix(BE): auth controller에서 추가된 로그아웃 제거 - 개발 서버 반영 후 결과 파악 #114
  • Loading branch information
namhyo01 authored Oct 18, 2023
2 parents c56883b + f6b1ddc commit 688ec30
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 18 deletions.
15 changes: 0 additions & 15 deletions src/main/java/com/example/api/auth/adapter/in/AuthController.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,8 @@
@RefreshScope
public class AuthController {
private final JwtUtilService jwtUtilService;
private final LogoutUsecase logoutUsecase;
private final FindRefreshUsecase findRefreshUsecase;

@PostMapping("/auth/logout")
public ResponseEntity<StatusResponseDto> logout(@CookieValue String access_token, HttpServletResponse response) {
log.info("wow come to logout");
log.info(access_token);
logoutUsecase.removeToken(access_token);
Cookie cookie = new Cookie("access_token", null);
cookie.setMaxAge(0);
response.addCookie(cookie);
// CookieUtils.addCookie(response, "access_token", null, 0);
log.info("쿠키 삭제");
//
return ResponseEntity.ok(StatusResponseDto.addStatus(200));
}

@PostMapping("/auth/refresh")
public ResponseEntity<TokenResponseStatus> refresh(@CookieValue String access_token, HttpServletResponse response) {
// accessToken 여부 확인
Expand Down
3 changes: 0 additions & 3 deletions src/main/java/com/example/api/auth/config/SecurityConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,6 @@ public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Excepti
logout
.logoutUrl("/logout")
.clearAuthentication(true)
.addLogoutHandler(((request, response, authentication) -> {

}))
.logoutSuccessHandler(myLogoutSuccessHandler)
.permitAll()

Expand Down

0 comments on commit 688ec30

Please sign in to comment.