From 5fb3dfc452d75fd0eee6a813a372e6762079c7a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=B0=95=EC=A0=95=EB=AF=BC?= Date: Wed, 24 Jul 2024 13:26:14 +0900 Subject: [PATCH 1/3] =?UTF-8?q?feat:=20swagger-ui=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/edufocus/edufocus/user/config/WebConfiguration.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/main/java/com/edufocus/edufocus/user/config/WebConfiguration.java b/backend/src/main/java/com/edufocus/edufocus/user/config/WebConfiguration.java index bed956a..70e3cec 100644 --- a/backend/src/main/java/com/edufocus/edufocus/user/config/WebConfiguration.java +++ b/backend/src/main/java/com/edufocus/edufocus/user/config/WebConfiguration.java @@ -43,6 +43,6 @@ public class WebConfiguration implements WebMvcConfigurer { public void addInterceptors(InterceptorRegistry registry) { registry.addInterceptor(jwtInterceptor) .addPathPatterns("/**") // 모든 경로에 대해 인터셉터 적용 - .excludePathPatterns("/auth/**", "/board/**", "/user/**","/lecture/**","/qna/**"); // 인증 없이 접근 가능한 경로 설정 + .excludePathPatterns("swagger-ui/**","/auth/**", "/board/**", "/user/**","/lecture/**","/qna/**"); // 인증 없이 접근 가능한 경로 설정 } } \ No newline at end of file From 6d03363a0e71f88829e8ef6ee963ef84e083ecb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=B0=95=EC=A0=95=EB=AF=BC?= Date: Wed, 24 Jul 2024 13:52:31 +0900 Subject: [PATCH 2/3] feat: swagger --- .../com/edufocus/edufocus/user/config/WebConfiguration.java | 6 +++++- backend/src/main/resources/application.properties | 3 +-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/backend/src/main/java/com/edufocus/edufocus/user/config/WebConfiguration.java b/backend/src/main/java/com/edufocus/edufocus/user/config/WebConfiguration.java index 70e3cec..8a1f979 100644 --- a/backend/src/main/java/com/edufocus/edufocus/user/config/WebConfiguration.java +++ b/backend/src/main/java/com/edufocus/edufocus/user/config/WebConfiguration.java @@ -18,6 +18,7 @@ public class WebConfiguration implements WebMvcConfigurer { public WebConfiguration(JWTInterceptor jwtInterceptor) { super(); + this.jwtInterceptor = jwtInterceptor; } @@ -42,7 +43,10 @@ public class WebConfiguration implements WebMvcConfigurer { @Override public void addInterceptors(InterceptorRegistry registry) { registry.addInterceptor(jwtInterceptor) + .addPathPatterns("/**") // 모든 경로에 대해 인터셉터 적용 - .excludePathPatterns("swagger-ui/**","/auth/**", "/board/**", "/user/**","/lecture/**","/qna/**"); // 인증 없이 접근 가능한 경로 설정 + .excludePathPatterns("/v3/api-docs/**","/swagger-resources/**","/webjars/**","/swagger-ui/**","/auth/**", "/board/**", "/user/**","/lecture/**","/qna/**"); // 인증 없이 접근 가능한 경로 설정 + + ///v3/api-docs/**, /swagger-resources/**, /webjars/** } } \ No newline at end of file diff --git a/backend/src/main/resources/application.properties b/backend/src/main/resources/application.properties index 76ad644..37b4488 100644 --- a/backend/src/main/resources/application.properties +++ b/backend/src/main/resources/application.properties @@ -28,8 +28,7 @@ spring.jpa.hibernate.ddl-auto=create spring.jpa.show-sql=true -springdoc.api-docs.path=/api/v3/api-docs -springdoc.swagger-ui.path=/api/swagger-ui.html + spring.mail.host=smtp.gmail.com spring.mail.port=587 From 2f7e8431451cd7463d8e65a5eedb342586c2b1d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=B0=95=EC=A0=95=EB=AF=BC?= Date: Wed, 24 Jul 2024 15:36:42 +0900 Subject: [PATCH 3/3] =?UTF-8?q?feat:=20refreshToken=20cookie=20=EC=84=A4?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/edufocus/edufocus/user/controller/UserController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/main/java/com/edufocus/edufocus/user/controller/UserController.java b/backend/src/main/java/com/edufocus/edufocus/user/controller/UserController.java index e185b6c..f27e42d 100644 --- a/backend/src/main/java/com/edufocus/edufocus/user/controller/UserController.java +++ b/backend/src/main/java/com/edufocus/edufocus/user/controller/UserController.java @@ -77,7 +77,7 @@ public class UserController { Cookie refreshCookie = new Cookie("refresh-token", refreshToken); refreshCookie.setPath("/"); refreshCookie.setHttpOnly(true); - refreshCookie.setSecure(true); // HTTPS에서만 전송되도록 설정 + // refreshCookie.setSecure(true); // HTTPS에서만 전송되도록 설정 // refreshCookie.setSameSite(Cookie.SameSite.NONE); // Cross-Origin 요청에 대해 모두 전송 response.addCookie(refreshCookie);