From 3ed38073d1a54a1a20e9f97747d1cd0519486e4b Mon Sep 17 00:00:00 2001 From: leejunnyeop Date: Sun, 18 May 2025 06:10:28 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20Swagger=20=ED=85=8C=EC=8A=A4=ED=8A=B8=20?= =?UTF-8?q?=EC=8B=9C=20httpBasic=20=EC=9D=B8=EC=A6=9D=20=ED=8C=9D=EC=97=85?= =?UTF-8?q?=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Spring Security 설정에서 .httpBasic() 제거 - 기본 인증 팝업 대신 401 JSON 응답 처리 - JWT 인증 구조에 맞는 인증 흐름 유지 --- .../com/example/hackathon/global/config/SecurityConfig.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/example/hackathon/global/config/SecurityConfig.java b/src/main/java/com/example/hackathon/global/config/SecurityConfig.java index 2787458..ddee4c2 100644 --- a/src/main/java/com/example/hackathon/global/config/SecurityConfig.java +++ b/src/main/java/com/example/hackathon/global/config/SecurityConfig.java @@ -45,10 +45,10 @@ public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Excepti "/docs/**" ).permitAll() .anyRequest().authenticated() - ) + ); // ✅ 기타 설정 (필요 시 추가) - .httpBasic(Customizer.withDefaults()); + //.httpBasic(Customizer.withDefaults()); // ✅ JWT 인증 필터 적용 http.addFilterBefore(jwtAuthenticationFilter, UsernamePasswordAuthenticationFilter.class);