Skip to content

Commit 52b7949

Browse files
authored
[refactor/#442] Auth security 내부 책임 명명 정리 (#446)
* refactor: 리프레시 토큰 저장소 명명 정리 * refactor: auth 캐시 서비스를 redis 의존성에 맞게 Store로 변환 * refactor: auth 캐시 리스너를 cache 패키지 하위로 이동 * refactor: 리프레시 토큰 쿠키 Writer를 Util에서 분리 * docs: 문서를 코드 변경사항에 맞게 정리 * refactor: 리프레시 토큰 쿠키 정책을 Writer에 캡슐화
1 parent d655617 commit 52b7949

23 files changed

Lines changed: 194 additions & 156 deletions

docs/ddd-test-refactoring-roadmap.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -859,7 +859,7 @@ global/util/ContentCleaner -> Source / Post shared content support 후
859859

860860
```text
861861
1. User Account 4.3
862-
- 필요 시 Auth / Security shared seam(UserAuthCacheService, UserPrincipal)만 함께 정리
862+
- 필요 시 Auth / Security shared seam(UserAuthCacheStore, UserPrincipal)만 함께 정리
863863
- Auth / Security 전체 경계 이동은 별도 이슈에서 진행한다
864864
865865
2. Personalization Profile 4.4

docs/domain-strategy.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ TechFork의 비즈니스 도메인은 다음으로 정의할 수 있다.
152152

153153
1. `UserCommandService``InterestCommandService`는 사용자 상태/관심사 변경 후 이벤트만 발행한다.
154154
2. `PersonalizationProfileEventListener``OnboardingCompletedEvent`, `UserInterestsChangedEvent``AFTER_COMMIT`에서 받아 개인화 프로필 생성을 요청한다.
155-
3. `UserAuthCacheEventListener``OnboardingCompletedEvent``AFTER_COMMIT`, `UserWithdrawnEvent``BEFORE_COMMIT + AFTER_COMMIT`으로 받아 인증 캐시를 무효화한다.
155+
3. `UserAuthCacheInvalidationListener``OnboardingCompletedEvent``AFTER_COMMIT`, `UserWithdrawnEvent``BEFORE_COMMIT + AFTER_COMMIT`으로 받아 인증 캐시를 무효화한다.
156156
4. `PersonalizationProfileService`는 프로필 생성 orchestration과 생성 완료 이벤트 발행을 맡고, 활동 수집/LLM 분석/저장은 하위 application component로 분리되었다.
157157
5. 추천 생성은 `PersonalizedProfileGeneratedEvent`를 통해 Recommendation 리스너가 커밋 이후 처리한다.
158158
6. `PersonalizationProfileDocument`는 독립 write aggregate보다 검색·추천용 read model/projection에 가깝다.
@@ -232,7 +232,7 @@ U/D 표기: **U** = Upstream(상류, 공급자), **D** = Downstream(하류, 소
232232
| Pair | Seam | From (D, 소비자) | To (U, 공급자) | 관계 유형(현재 As-Is) | 관계 유형(목표 To-Be) | 통신/통합 패턴(목표) | 현재 구현 / 의존 방식 | 해석 및 개선 후보 |
233233
|---|---|---|---|---|---|---|---|---|
234234
| Auth / Security ↔ User Account | 사용자 식별/권한 | `Auth / Security` | `User Account` | **SK** | **SK** (Shared Kernel) | 공유 식별자/권한 kernel | `UserRepository`, `User`, `UserPrincipal` 직접 참조 | `UserId`, `Role`, `UserStatus`를 최소 공유 커널로 공유한다. User 전체 모델 공유는 줄이는 것이 목표다. |
235-
| Auth / Security ↔ User Account | 인증 캐시 무효화 | `Auth / Security` | `User Account` | **OHS/PL 이벤트 handoff** | **OHS/PL** | `OnboardingCompletedEvent`, `UserWithdrawnEvent` | `UserAuthCacheEventListener`가 이벤트를 구독해 `UserAuthCacheService`를 호출 | 온보딩은 커밋 후 캐시 반영 지연을 허용한다. 탈퇴는 보안 민감 seam이라 `BEFORE_COMMIT`에서 실패 시 롤백하고 `AFTER_COMMIT`에서 한 번 더 무효화한다. |
235+
| Auth / Security ↔ User Account | 인증 캐시 무효화 | `Auth / Security` | `User Account` | **OHS/PL 이벤트 handoff** | **OHS/PL** | `OnboardingCompletedEvent`, `UserWithdrawnEvent` | `UserAuthCacheInvalidationListener`가 이벤트를 구독해 `UserAuthCacheStore`를 호출 | 온보딩은 커밋 후 캐시 반영 지연을 허용한다. 탈퇴는 보안 민감 seam이라 `BEFORE_COMMIT`에서 실패 시 롤백하고 `AFTER_COMMIT`에서 한 번 더 무효화한다. |
236236
| Notification ↔ User Account | 알림 토큰 소유자 식별 | `Notification` | `User Account` | **SK** (최소 shared identity) | **SK** (최소 Shared Identity) | 사용자 귀속 참조 | `NotificationToken.user` 직접 참조 | 장기적으로는 `UserId` 중심 참조로 축소할 수 있다. |
237237
| Source / Ingestion ↔ 외부 RSS | 피드 포맷 적응 | `Source / Ingestion` | 외부 RSS | **ACL** | **ACL** (Anti-Corruption Layer) | 외부 어댑터 / 포맷 변환 | `WebClient`, Rome RSS parser | Source가 외부 RSS 형식을 내부 `RssFeedItem`으로 변환한다. 외부 스키마 변경 시 변환 로직만 수정하면 된다. |
238238
| Source / Ingestion ↔ Post / Content | 기술 게시글 후보 전달 | `Post / Content` | `Source / Ingestion` | **CS + 동기 직접 호출** | **OHS/PL** (Open Host Service / Published Language) | 게시글 후보 Published DTO / 이벤트 handoff | 현재는 `RssFeedItem``Post`로 변환하고 `PostBatchWriter``posts`에 저장 | 현재 구현은 Source가 Post 생성까지 책임지는 동기 직접 호출이다. 목표 상태는 `TechnicalPostDiscovered` 같은 published language/event handoff다. |

docs/test-gap-analysis.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ ContentChunkerServiceTest
275275
| `InterestCommandServiceTest` | unit/mock | 관심사 저장, 기존 관심사 clear, invalid keyword category, 관심사 수정 이벤트 발행 |
276276
| `UserCommandServiceTest` | unit/mock | 온보딩, 계정 프로필 수정, 탈퇴, 온보딩/탈퇴 이벤트 발행 |
277277
| `PersonalizationProfileEventListenerTest` | unit/mock | 온보딩/관심사 변경 이벤트의 `AFTER_COMMIT` 개인화 프로필 생성 요청 |
278-
| `UserAuthCacheEventListenerTest` | unit/mock | 온보딩 `AFTER_COMMIT` 캐시 evict, 탈퇴 `BEFORE_COMMIT + AFTER_COMMIT` 캐시 evict |
278+
| `UserAuthCacheInvalidationListenerTest` | unit/mock | 온보딩 `AFTER_COMMIT` 캐시 evict, 탈퇴 `BEFORE_COMMIT + AFTER_COMMIT` 캐시 evict |
279279
| `UserAccountAfterCommitEventIntegrationTest` | integration | 커밋 후 후처리 실행, 롤백 시 후처리 미실행, 탈퇴 evict 실패 시 트랜잭션 롤백 |
280280
| `UserQueryServiceTest` | unit/mock | 계정 프로필 조회 |
281281
| `PersonalizationProfileServiceTest` | unit/mock | 프로필 생성 성공 시 이벤트 발행, 생성 실패 시 이벤트 미발행 |
@@ -453,8 +453,8 @@ SearchControllerIntegrationTest
453453
| `OAuth2AuthenticationFailureHandlerTest` | unit/mock | OIDC 로그인 실패 redirect |
454454
| `CustomOidcUserServiceTest` | unit/mock | Kakao/Apple OIDC 사용자 생성/재사용/재활성화 |
455455
| `HttpCookieOAuth2AuthorizationRequestRepositoryTest` | unit/mock | OAuth authorization request cookie 저장/로드/삭제 |
456-
| `UserAuthCacheServiceTest` | unit/mock | auth cache serialization/deserialization |
457-
| `UserAuthCacheEventListenerTest` | unit/mock | User Account 이벤트 기반 auth cache eviction |
456+
| `UserAuthCacheStoreTest` | unit/mock | auth cache serialization/deserialization |
457+
| `UserAuthCacheInvalidationListenerTest` | unit/mock | User Account 이벤트 기반 auth cache eviction |
458458

459459
#### 평가
460460

docs/ubiquitous-language/auth-security.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,12 @@
3737
| 내부 용어 | 코드상 표현 | 설명 |
3838
|---|---|---|
3939
| 토큰 발급기 | `JwtUtil` | 액세스/리프레시/개발자 토큰 생성과 검증을 담당 |
40-
| 리프레시 토큰 저장소 | `RefreshTokenService` | Redis/Cookie 기반 리프레시 토큰 저장/검증 서비스 |
40+
| 리프레시 토큰 저장소 | `RefreshTokenStore` | Redis 기반 리프레시 토큰 저장/검증/삭제 store |
4141
| 인증 필터 | `JwtAuthenticationFilter` | 요청에서 JWT를 읽어 인증 컨텍스트를 채우는 필터 |
4242
| OAuth 요청 저장소 | `HttpCookieOAuth2AuthorizationRequestRepository` | OAuth 인증 요청 상태를 쿠키로 보관하는 구성요소 |
43-
| 사용자 인증 캐시 | `UserAuthCacheService` | 로그인/토큰 갱신 이후 사용자 인증 조회를 보조하는 캐시 |
44-
| 인증 캐시 이벤트 리스너 | `UserAuthCacheEventListener` | User Account 이벤트를 받아 사용자 인증 캐시를 무효화하는 리스너 |
43+
| 리프레시 토큰 쿠키 writer | `RefreshTokenCookieWriter` | refresh token `Set-Cookie` 작성/삭제 정책을 담당하는 응답 writer |
44+
| 사용자 인증 캐시 저장소 | `UserAuthCacheStore` | 로그인/토큰 갱신 이후 사용자 인증 조회를 보조하는 Redis cache store |
45+
| 인증 캐시 무효화 리스너 | `UserAuthCacheInvalidationListener` | User Account 이벤트를 받아 사용자 인증 캐시를 무효화하는 transactional event adapter |
4546

4647
## 혼동 금지
4748

@@ -75,8 +76,9 @@
7576
- `src/main/java/com/techfork/auth/security/AuthSecurityConstants.java`
7677
- `src/main/java/com/techfork/auth/security/config/SecurityConfig.java`
7778
- `src/main/java/com/techfork/auth/security/jwt/JwtUtil.java`
78-
- `src/main/java/com/techfork/auth/security/service/RefreshTokenService.java`
79-
- `src/main/java/com/techfork/auth/security/service/UserAuthCacheService.java`
79+
- `src/main/java/com/techfork/auth/security/token/RefreshTokenStore.java`
80+
- `src/main/java/com/techfork/auth/security/cache/UserAuthCacheStore.java`
81+
- `src/main/java/com/techfork/auth/security/cookie/RefreshTokenCookieWriter.java`
8082
- `src/main/java/com/techfork/auth/security/util/HeaderUtil.java`
81-
- `src/main/java/com/techfork/auth/security/listener/UserAuthCacheEventListener.java`
83+
- `src/main/java/com/techfork/auth/security/cache/UserAuthCacheInvalidationListener.java`
8284
- `src/main/java/com/techfork/auth/security/oauth/UserPrincipal.java`

src/main/java/com/techfork/auth/application/command/AuthCommandService.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
import com.techfork.auth.security.jwt.JwtDTO;
1010
import com.techfork.auth.security.jwt.JwtProperties;
1111
import com.techfork.auth.security.jwt.JwtUtil;
12-
import com.techfork.auth.security.service.RefreshTokenService;
13-
import com.techfork.auth.security.service.UserAuthCacheService;
12+
import com.techfork.auth.security.token.RefreshTokenStore;
13+
import com.techfork.auth.security.cache.UserAuthCacheStore;
1414
import com.techfork.global.exception.GeneralException;
1515
import com.techfork.useraccount.application.auth.UserAuthAccountService;
1616
import com.techfork.useraccount.application.auth.UserAuthProfile;
@@ -29,10 +29,10 @@
2929
public class AuthCommandService {
3030

3131
private final JwtUtil jwtUtil;
32-
private final RefreshTokenService refreshTokenService;
32+
private final RefreshTokenStore refreshTokenStore;
3333
private final UserAuthAccountService userAuthAccountService;
3434
private final JwtProperties jwtProperties;
35-
private final UserAuthCacheService userAuthCacheService;
35+
private final UserAuthCacheStore userAuthCacheStore;
3636

3737
public TokenRefreshResult refreshToken(RefreshTokenCommand command) {
3838
String refreshToken = command.refreshToken();
@@ -48,7 +48,7 @@ public TokenRefreshResult refreshToken(RefreshTokenCommand command) {
4848
long expiration = jwtProperties.getRefreshTokenExpiration();
4949
saveRefreshToken(userId, newTokens.refreshToken(), expiration);
5050

51-
userAuthCacheService.put(userId, userAuthProfile, jwtProperties.getAccessTokenExpiration());
51+
userAuthCacheStore.put(userId, userAuthProfile, jwtProperties.getAccessTokenExpiration());
5252

5353
log.info("Token refreshed");
5454

@@ -98,18 +98,18 @@ private void validateRefreshTokenRequest(String refreshToken) {
9898
}
9999

100100
private void validateRefreshTokenInRedis(Long userId, String refreshToken) {
101-
if (!refreshTokenService.validateRefreshToken(userId, refreshToken)) {
102-
refreshTokenService.deleteRefreshToken(userId);
101+
if (!refreshTokenStore.validateRefreshToken(userId, refreshToken)) {
102+
refreshTokenStore.deleteRefreshToken(userId);
103103
log.warn("Refresh token mismatch detected for userId: {}. Session invalidated.", userId);
104104
throw new GeneralException(AuthErrorCode.REFRESH_TOKEN_MISMATCH);
105105
}
106106
}
107107

108108
private void saveRefreshToken(Long userId, String refreshToken, long expiration) {
109-
refreshTokenService.saveRefreshToken(userId, refreshToken, expiration);
109+
refreshTokenStore.saveRefreshToken(userId, refreshToken, expiration);
110110
}
111111

112112
private void deleteRefreshToken(Long userId) {
113-
refreshTokenService.deleteRefreshToken(userId);
113+
refreshTokenStore.deleteRefreshToken(userId);
114114
}
115115
}

src/main/java/com/techfork/auth/application/command/KakaoLoginCommandService.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import com.techfork.auth.security.jwt.JwtDTO;
99
import com.techfork.auth.security.jwt.JwtProperties;
1010
import com.techfork.auth.security.jwt.JwtUtil;
11-
import com.techfork.auth.security.service.RefreshTokenService;
11+
import com.techfork.auth.security.token.RefreshTokenStore;
1212
import com.techfork.useraccount.application.auth.UserAuthAccountService;
1313
import com.techfork.useraccount.application.auth.UserAuthProfile;
1414
import com.techfork.useraccount.domain.enums.SocialType;
@@ -27,7 +27,7 @@ public class KakaoLoginCommandService {
2727
private final UserAuthAccountService userAuthAccountService;
2828
private final JwtUtil jwtUtil;
2929
private final JwtProperties jwtProperties;
30-
private final RefreshTokenService refreshTokenService;
30+
private final RefreshTokenStore refreshTokenStore;
3131

3232
public KakaoLoginResult login(KakaoLoginCommand command) {
3333
KakaoUserInfoResponse kakaoUserInfo = kakaoOAuthService.getUserInfo(command.accessToken());
@@ -45,7 +45,7 @@ public KakaoLoginResult login(KakaoLoginCommand command) {
4545

4646
JwtDTO tokens = jwtUtil.generateTokens(userAuthProfile.id(), userAuthProfile.role());
4747
long expiration = jwtProperties.getRefreshTokenExpiration();
48-
refreshTokenService.saveRefreshToken(userAuthProfile.id(), tokens.refreshToken(), expiration);
48+
refreshTokenStore.saveRefreshToken(userAuthProfile.id(), tokens.refreshToken(), expiration);
4949

5050
log.info("Direct Kakao login successful - userId: {}, isRegistered: {}",
5151
userAuthProfile.id(), userAuthProfile.active());

src/main/java/com/techfork/auth/presentation/controller/AuthController.java

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,13 @@
77
import com.techfork.auth.presentation.annotation.AuthApi;
88
import com.techfork.auth.presentation.converter.AuthTokenConverter;
99
import com.techfork.auth.presentation.response.TokenRefreshResponse;
10-
import com.techfork.auth.security.util.CookieUtil;
10+
import com.techfork.auth.security.cookie.RefreshTokenCookieWriter;
1111
import com.techfork.global.common.code.SuccessCode;
1212
import com.techfork.global.response.BaseResponse;
1313
import io.swagger.v3.oas.annotations.Operation;
1414
import jakarta.servlet.http.HttpServletResponse;
1515
import lombok.RequiredArgsConstructor;
1616
import lombok.extern.slf4j.Slf4j;
17-
import org.springframework.beans.factory.annotation.Value;
1817
import org.springframework.http.ResponseEntity;
1918
import org.springframework.web.bind.annotation.CookieValue;
2019
import org.springframework.web.bind.annotation.PostMapping;
@@ -30,9 +29,7 @@ public class AuthController {
3029

3130
private final AuthCommandService authCommandService;
3231
private final AuthTokenConverter authTokenConverter;
33-
34-
@Value("${server.domain}")
35-
private String domain;
32+
private final RefreshTokenCookieWriter refreshTokenCookieWriter;
3633

3734
@Operation(
3835
summary = "토큰 갱신",
@@ -45,7 +42,7 @@ public ResponseEntity<BaseResponse<TokenRefreshResponse>> refreshToken(
4542
) {
4643
RefreshTokenCommand command = authTokenConverter.toRefreshTokenCommand(refreshToken);
4744
TokenRefreshResult result = authCommandService.refreshToken(command);
48-
CookieUtil.addRefreshTokenCookie(response, domain, result.refreshToken(), result.refreshTokenExpiration());
45+
refreshTokenCookieWriter.write(response, result.refreshToken(), result.refreshTokenExpiration());
4946

5047
TokenRefreshResponse tokenResponse = authTokenConverter.toTokenRefreshResponse(result);
5148
return BaseResponse.of(SuccessCode.OK, tokenResponse);
@@ -62,7 +59,7 @@ public ResponseEntity<BaseResponse<Void>> logout(
6259
) {
6360
LogoutCommand command = authTokenConverter.toLogoutCommand(refreshToken);
6461
authCommandService.logout(command);
65-
CookieUtil.deleteRefreshTokenCookie(response, domain);
62+
refreshTokenCookieWriter.delete(response);
6663
return BaseResponse.of(SuccessCode.OK);
6764
}
6865
}

src/main/java/com/techfork/auth/presentation/controller/KakaoLoginController.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,14 @@
77
import com.techfork.auth.presentation.converter.KakaoLoginConverter;
88
import com.techfork.auth.presentation.request.KakaoLoginRequest;
99
import com.techfork.auth.presentation.response.KakaoLoginResponse;
10-
import com.techfork.auth.security.util.CookieUtil;
10+
import com.techfork.auth.security.cookie.RefreshTokenCookieWriter;
1111
import com.techfork.global.common.code.SuccessCode;
1212
import com.techfork.global.response.BaseResponse;
1313
import io.swagger.v3.oas.annotations.Operation;
1414
import jakarta.servlet.http.HttpServletResponse;
1515
import jakarta.validation.Valid;
1616
import lombok.RequiredArgsConstructor;
1717
import lombok.extern.slf4j.Slf4j;
18-
import org.springframework.beans.factory.annotation.Value;
1918
import org.springframework.http.ResponseEntity;
2019
import org.springframework.web.bind.annotation.PostMapping;
2120
import org.springframework.web.bind.annotation.RequestBody;
@@ -31,9 +30,7 @@ public class KakaoLoginController {
3130

3231
private final KakaoLoginCommandService kakaoLoginCommandService;
3332
private final KakaoLoginConverter kakaoLoginConverter;
34-
35-
@Value("${server.domain}")
36-
private String domain;
33+
private final RefreshTokenCookieWriter refreshTokenCookieWriter;
3734

3835
@Operation(
3936
summary = "카카오 로그인",
@@ -46,7 +43,7 @@ public ResponseEntity<BaseResponse<KakaoLoginResponse>> kakaoLogin(
4643
) {
4744
KakaoLoginCommand command = kakaoLoginConverter.toKakaoLoginCommand(request);
4845
KakaoLoginResult result = kakaoLoginCommandService.login(command);
49-
CookieUtil.addRefreshTokenCookie(response, domain, result.refreshToken(), result.refreshTokenExpiration());
46+
refreshTokenCookieWriter.write(response, result.refreshToken(), result.refreshTokenExpiration());
5047

5148
KakaoLoginResponse loginResponse = kakaoLoginConverter.toKakaoLoginResponse(result);
5249
return BaseResponse.of(SuccessCode.OK, loginResponse);

src/main/java/com/techfork/auth/security/listener/UserAuthCacheEventListener.java renamed to src/main/java/com/techfork/auth/security/cache/UserAuthCacheInvalidationListener.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
package com.techfork.auth.security.listener;
1+
package com.techfork.auth.security.cache;
22

3-
import com.techfork.auth.security.service.UserAuthCacheService;
43
import com.techfork.useraccount.application.event.OnboardingCompletedEvent;
54
import com.techfork.useraccount.application.event.UserReactivatedEvent;
65
import com.techfork.useraccount.application.event.UserWithdrawnEvent;
@@ -13,14 +12,14 @@
1312
@Slf4j
1413
@Component
1514
@RequiredArgsConstructor
16-
public class UserAuthCacheEventListener {
15+
public class UserAuthCacheInvalidationListener {
1716

1817
private static final String ONBOARDING_COMPLETED_AFTER_COMMIT = "onboarding-completed-after-commit";
1918
private static final String USER_REACTIVATED_AFTER_COMMIT = "user-reactivated-after-commit";
2019
private static final String USER_WITHDRAWN_BEFORE_COMMIT = "user-withdrawn-before-commit";
2120
private static final String USER_WITHDRAWN_AFTER_COMMIT = "user-withdrawn-after-commit";
2221

23-
private final UserAuthCacheService userAuthCacheService;
22+
private final UserAuthCacheStore userAuthCacheStore;
2423

2524
@TransactionalEventListener(phase = TransactionPhase.AFTER_COMMIT)
2625
public void evictOnOnboardingCompletedAfterCommit(OnboardingCompletedEvent event) {
@@ -47,7 +46,7 @@ public void evictOnUserWithdrawnAfterCommit(UserWithdrawnEvent event) {
4746
}
4847

4948
private void evictUserAuthCache(Long userId, String reason) {
50-
userAuthCacheService.evict(userId);
49+
userAuthCacheStore.evict(userId);
5150
log.info("User auth cache eviction requested - userId: {}, reason: {}", userId, reason);
5251
}
5352
}

src/main/java/com/techfork/auth/security/service/UserAuthCacheService.java renamed to src/main/java/com/techfork/auth/security/cache/UserAuthCacheStore.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.techfork.auth.security.service;
1+
package com.techfork.auth.security.cache;
22

33
import com.techfork.auth.security.oauth.UserPrincipal;
44
import com.techfork.global.constant.RedisKey;
@@ -9,12 +9,12 @@
99
import lombok.RequiredArgsConstructor;
1010
import lombok.extern.slf4j.Slf4j;
1111
import org.springframework.data.redis.core.StringRedisTemplate;
12-
import org.springframework.stereotype.Service;
12+
import org.springframework.stereotype.Component;
1313

1414
@Slf4j
15-
@Service
15+
@Component
1616
@RequiredArgsConstructor
17-
public class UserAuthCacheService {
17+
public class UserAuthCacheStore {
1818

1919
private static final String DELIMITER = "|";
2020
private static final int FIELD_COUNT = 4;

0 commit comments

Comments
 (0)