Skip to content

Commit cf32c1b

Browse files
authored
Merge pull request #170 from GoToBILL/fix
feat: User 엔티티에 30일 이내 계정 복구 기능을 추가했습니다
2 parents 46d08c8 + d279b17 commit cf32c1b

16 files changed

+36
-942
lines changed

src/main/java/com/example/cherrydan/common/entity/BaseTimeEntity.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import jakarta.persistence.EntityListeners;
55
import jakarta.persistence.MappedSuperclass;
66
import lombok.Getter;
7+
import lombok.Setter;
78
import org.springframework.data.annotation.CreatedDate;
89
import org.springframework.data.annotation.LastModifiedDate;
910
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
@@ -22,4 +23,8 @@ public abstract class BaseTimeEntity {
2223
@LastModifiedDate
2324
@Column(name = "updatedAt")
2425
private LocalDateTime updatedAt;
26+
27+
@Setter
28+
@Column(name = "deletedAt")
29+
private LocalDateTime deletedAt;
2530
}

src/main/java/com/example/cherrydan/oauth/config/SecurityConfig.java

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
package com.example.cherrydan.oauth.config;
22

33
import com.example.cherrydan.oauth.security.jwt.JwtAuthenticationFilter;
4-
import com.example.cherrydan.oauth.security.oauth2.CustomOAuth2UserService;
5-
import com.example.cherrydan.oauth.security.oauth2.OAuth2AuthenticationFailureHandler;
6-
import com.example.cherrydan.oauth.security.oauth2.OAuth2AuthenticationSuccessHandler;
74
import lombok.RequiredArgsConstructor;
85
import org.springframework.context.annotation.Bean;
96
import org.springframework.context.annotation.Configuration;
@@ -24,9 +21,6 @@
2421
@RequiredArgsConstructor
2522
public class SecurityConfig {
2623

27-
private final CustomOAuth2UserService customOAuth2UserService;
28-
private final OAuth2AuthenticationSuccessHandler oAuth2AuthenticationSuccessHandler;
29-
private final OAuth2AuthenticationFailureHandler oAuth2AuthenticationFailureHandler;
3024
private final JwtAuthenticationFilter jwtAuthenticationFilter;
3125

3226
@Bean
@@ -47,8 +41,6 @@ public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Excepti
4741
// Apple 테스트 경로 허용
4842
.requestMatchers("/api/auth/apple/**","/api/auth/naver/**","/api/auth/kakao/**","/api/auth/google/**").permitAll()
4943
.requestMatchers("/apple-login-test.html").permitAll()
50-
// OAuth2 관련 경로
51-
.requestMatchers("/api/oauth2/**", "/api/login/oauth2/**").permitAll()
5244
// 캠페인 관련 경로
5345
.requestMatchers("/api/campaigns/**").permitAll()
5446
// 공지사항/홈 광고 배너 관련 경로
@@ -59,13 +51,6 @@ public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Excepti
5951
// 나머지는 인증 필요
6052
.anyRequest().authenticated()
6153
)
62-
.oauth2Login(oauth2 -> oauth2
63-
.authorizationEndpoint(endpoint -> endpoint.baseUri("/api/oauth2/authorization"))
64-
.redirectionEndpoint(endpoint -> endpoint.baseUri("/api/login/oauth2/code/*"))
65-
.userInfoEndpoint(endpoint -> endpoint.userService(customOAuth2UserService))
66-
.successHandler(oAuth2AuthenticationSuccessHandler)
67-
.failureHandler(oAuth2AuthenticationFailureHandler)
68-
)
6954
// JWT 필터 추가
7055
.addFilterBefore(jwtAuthenticationFilter, UsernamePasswordAuthenticationFilter.class);
7156

src/main/java/com/example/cherrydan/oauth/controller/AppleAuthController.java

Lines changed: 0 additions & 86 deletions
This file was deleted.

src/main/java/com/example/cherrydan/oauth/controller/GoogleAuthController.java

Lines changed: 0 additions & 110 deletions
This file was deleted.

src/main/java/com/example/cherrydan/oauth/controller/KakaoAuthController.java

Lines changed: 0 additions & 109 deletions
This file was deleted.

0 commit comments

Comments
 (0)