Skip to content

Conversation

@yechan-kim
Copy link
Member

1. 무슨 이유로 코드를 변경했나요?

  • Spring Security와 관련된 코드를 Kotlin으로 마이그레이션을 진행했습니다. 변경된 코드는 다음과 같습니다.
    • Spring Security 설정
    • Json Web Token 관련 코드
    • 예외 처리 코드

2. 어떤 위험이나 장애를 발견했나요?

  • 기존에 문제가 발생한 Refresh Token 재발급 이슈는 Access Token 시간을 1일로 연장하는 것으로 @jwnnoh님과 협의를 통해 결정하였습니다. 해당 부분에 대한 코드 변경 사항도 확인하시면 될 것 같습니다.

3. 관련 스크린샷을 첨부해주세요.

image

4. 완료 사항

  • Spring Security 연관 코드 Kotlin 마이그레이션

5. 추가 사항

Copy link

Copilot AI left a 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.

Copy link
Member

@jwnnoh jwnnoh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생 많으셨습니다! 논의한 수정사항들도 충분히 반영된 것 같아요 :)

@yechan-kim yechan-kim merged commit e83d912 into main Dec 26, 2025
1 check passed
@yechan-kim yechan-kim deleted the refactor/#81 branch December 26, 2025 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[refactor] Spring Security 마이그레이션

3 participants