From f8b6f9980f320595343af12e53cb6da193fa2acc Mon Sep 17 00:00:00 2001 From: yooonwodyd Date: Fri, 15 Nov 2024 02:19:52 +0900 Subject: [PATCH] refactor:[#84]- refact failure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 실패 임시 출력 추가. 추후 로그로 변경 --- .../helpmeCookies/global/security/WebSecurityConfig.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/helpmeCookies/global/security/WebSecurityConfig.java b/src/main/java/com/helpmeCookies/global/security/WebSecurityConfig.java index 324eb79..71b28ba 100644 --- a/src/main/java/com/helpmeCookies/global/security/WebSecurityConfig.java +++ b/src/main/java/com/helpmeCookies/global/security/WebSecurityConfig.java @@ -53,6 +53,9 @@ public SecurityFilterChain oauth2SecurityFilterChain(HttpSecurity http) throws E .successHandler((request, response, authentication) -> { response.sendRedirect("/oauth2/login/kakao"); }) + .failureHandler((request, response, exception) -> { + System.out.println(exception.getMessage()); + }) ); return http.build(); } @@ -74,8 +77,7 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception { "/v1/products/**", "/v1/reviews/**", "/ws/**", - "/v1/artists/**", - "/v1/users/**" + "/v1/artists/**" ).permitAll() .anyRequest().authenticated() ).exceptionHandling((exception) -> exception