From 5c668bbffbe7ca737bea6766551e3813705a1ae9 Mon Sep 17 00:00:00 2001 From: namhyo01 Date: Thu, 19 Oct 2023 03:50:52 +0900 Subject: [PATCH] =?UTF-8?q?fix(BE):=20=ED=85=8C=EC=8A=A4=ED=8A=B8=20?= =?UTF-8?q?=EC=BD=94=EB=93=9C=20=EC=82=AD=EC=A0=9C=20=EB=B0=8F=20=ED=95=84?= =?UTF-8?q?=EC=9A=94=EC=97=86=EB=8A=94=20=EB=A1=9C=EA=B7=B8=20=EC=A0=9C?= =?UTF-8?q?=EA=B1=B0=20#114?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/auth/adapter/in/AuthController.java | 15 --------------- .../api/auth/handler/MyLogoutSuccessHandler.java | 3 --- 2 files changed, 18 deletions(-) diff --git a/src/main/java/com/example/api/auth/adapter/in/AuthController.java b/src/main/java/com/example/api/auth/adapter/in/AuthController.java index dd7a49c..ff9fd26 100644 --- a/src/main/java/com/example/api/auth/adapter/in/AuthController.java +++ b/src/main/java/com/example/api/auth/adapter/in/AuthController.java @@ -55,19 +55,4 @@ public ResponseEntity refresh(@CookieValue String access_to return ResponseEntity.badRequest().body(TokenResponseStatus.addStatus(400,null)); } - - @GetMapping("/test") - public User test(Principal principal){ - User user = AuthenticationUtils.getCurrentUserAuthentication(); -// UserDetails userDetails = (UserDetails) SecurityContextHolder.getContext().getAuthentication().getPrincipal(); - log.info("안녕"); - log.info(user.toString()); - log.info(user.getUserId().toString() ); -// log.info(userDetails.getUsername()); -// log.info(userDetails.getPassword()); - if(user != null){ - log.info(user.getUserId().toString()); - } - return user; - } } \ No newline at end of file diff --git a/src/main/java/com/example/api/auth/handler/MyLogoutSuccessHandler.java b/src/main/java/com/example/api/auth/handler/MyLogoutSuccessHandler.java index 44b1785..5ce0e32 100644 --- a/src/main/java/com/example/api/auth/handler/MyLogoutSuccessHandler.java +++ b/src/main/java/com/example/api/auth/handler/MyLogoutSuccessHandler.java @@ -26,15 +26,12 @@ public class MyLogoutSuccessHandler implements LogoutSuccessHandler { @Override public void onLogoutSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication) throws IOException, ServletException { //로그 아웃 성공시 ok 보내자 - log.info("welcome logout success handler"); Cookie[] cookies = request.getCookies(); if(cookies != null) { for (Cookie cookie : request.getCookies()) { String cookieName = cookie.getName(); - log.info(cookieName); if(cookieName.equals("access_token")){ String accessToken = cookie.getValue(); - log.info("access_token : {}", accessToken); logoutUsecase.removeToken(accessToken); } CookieUtils.addCookie(response, cookieName, null, 0);