-
Notifications
You must be signed in to change notification settings - Fork 0
refactor: Spring Security 마이그레이션 #82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- AccessToken 만료시간 1일로 변경
- API 및 Http Method에 따른 권한 재설계
- 생성자를 통한 생성이 아닌, 정적 factory method를 통한 생성 제어 방식 채택
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR migrates Spring Security-related code from Java to Kotlin, including JWT token handling, security configuration, exception handling, and supporting classes. The migration addresses a refresh token reissuance issue by extending the access token lifetime from 6 hours to 1 day.
- Migrated JWT Provider, Filter, and response DTOs from Java to Kotlin
- Converted Security configuration and CORS configuration to Kotlin
- Refactored exception handling classes and filters to Kotlin
- Updated access token expiration from 6 hours to 1 day
Reviewed changes
Copilot reviewed 27 out of 27 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
src/main/kotlin/land/leets/global/jwt/JwtProvider.kt |
New Kotlin implementation of JWT token generation, validation, and authentication with extended access token lifetime |
src/main/kotlin/land/leets/global/jwt/JwtFilter.kt |
New Kotlin implementation of JWT authentication filter with updated ignored endpoints list |
src/main/kotlin/land/leets/global/jwt/dto/JwtResponse.kt |
Migrated JWT response DTO to Kotlin data class |
src/main/kotlin/land/leets/global/jwt/exception/*.kt |
Migrated token exception classes to Kotlin |
src/main/kotlin/land/leets/global/config/SecurityConfig.kt |
Migrated security configuration to Kotlin DSL with updated endpoint authorizations |
src/main/kotlin/land/leets/global/config/CorsConfig.kt |
Migrated CORS configuration to Kotlin |
src/main/kotlin/land/leets/global/filter/ExceptionHandleFilter.kt |
Migrated exception handling filter to Kotlin |
src/main/kotlin/land/leets/global/error/ErrorCode.kt |
Converted error code enum from Java to Kotlin |
src/main/kotlin/land/leets/global/error/ErrorResponse.kt |
Migrated error response to Kotlin data class |
src/main/kotlin/land/leets/global/error/exception/ServiceException.kt |
Converted service exception base class to Kotlin |
src/main/kotlin/land/leets/global/advise/ExceptionHandleAdvice.kt |
Migrated exception handler advice to Kotlin |
src/main/kotlin/land/leets/domain/shared/AuthRole.kt |
Converted auth role enum to Kotlin |
src/main/kotlin/land/leets/domain/user/presentation/UserController.kt |
Updated to use non-null assertion for user ID in token generation |
src/test/kotlin/land/leets/domain/admin/usecase/AdminRefreshTokenImplTest.kt |
Updated test mock to match new validateToken return type |
| Java files (deleted) | Removed all corresponding Java implementations |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/main/kotlin/land/leets/global/error/exception/ServiceException.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/land/leets/global/error/exception/ServiceException.kt
Outdated
Show resolved
Hide resolved
jwnnoh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생 많으셨습니다! 논의한 수정사항들도 충분히 반영된 것 같아요 :)
1. 무슨 이유로 코드를 변경했나요?
2. 어떤 위험이나 장애를 발견했나요?
3. 관련 스크린샷을 첨부해주세요.
4. 완료 사항
5. 추가 사항