-
Notifications
You must be signed in to change notification settings - Fork 1
refactor: Apple JWT 인증 시스템 리팩토링 및 키 파싱 안정화 #63
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
Merged
Merged
Changes from all commits
Commits
Show all changes
53 commits
Select commit
Hold shift + click to select a range
f5f3a69
[BOOK-179] chore: apis, gateway - 유틸클래스 패키지 이동
move-hoon fb422de
[BOOK-179] chore: buildSrc, apis - 애플 로그인 로직에 사용될 의존성 추가
move-hoon 1f99f1c
[BOOK-179] chore: apis - BouncyCastle PKIX 의존성 추가
move-hoon 4c8e488
[BOOK-179] feat: SocialLoginRequest에 Apple 로그인용 authorizationCode 필드 …
move-hoon 9684fde
[BOOK-179] feat: apis - AuthErrorCode에 잘못된 요청 및 내부 서버 오류 관련 에러 코드 추가
move-hoon c8d878d
[BOOK-179] feat: apis - Apple 로그인용 client-secret 생성기 클래스 추가
move-hoon e11c07a
[BOOK-179] feat: apis - Apple 로그인용 idToken 처리 및 검증 클래스 추가
move-hoon a0ad3a8
[BOOK-179] feat: apis - Apple 로그인용 개인 키 로더 클래스 추가
move-hoon ef3ddc9
[BOOK-179] refactor: apis - AuthTokenService로 역할 변경
move-hoon ce234b3
[BOOK-179] refactor: apis - AuthUseCase에서 AuthTokenHelper를 AuthTokenS…
move-hoon 7e0ab49
[BOOK-179] feat: apis - Apple 로그인용 PEM 형식 키 쌍 파서 클래스 추가
move-hoon 4ee7bfd
[BOOK-179] feat: apis - Apple 로그인용 authorizationCode 필드 추가
move-hoon 13def58
[BOOK-179] delete: apis - AppleJwtHelper.kt 파일 삭제
move-hoon 133a984
[BOOK-179] feat: apis - Apple 인증 전략 개선 및 AudienceValidator, AppleOaut…
move-hoon 3b3b967
[BOOK-179] feat: apis - Apple OAuth 인증을 위한 JWKSource 및 JwtEncoder, Jw…
move-hoon 6f0b792
[BOOK-179] chore: apis - AuthController에서 불필요한 주석 제거 및 application.ym…
move-hoon 77179de
[BOOK-179] chore: buildSrc - BouncyCastle에 PKIX 의존성 추가
move-hoon 459fde7
[BOOK-179] chore: apis - 역할에 맞는 네이밍으로 변경
move-hoon 8d19a77
[BOOK-179] feat: domain, infra - apple 리프레쉬 토큰 칼럼 추가
move-hoon a999ab1
[BOOK-179] feat: domain - UserAuthVO 클래스 생성 (appleRefreshToken 포함)
move-hoon 2bae78e
[BOOK-179] refactor: domain - 애플 리프레쉬 토큰 저장을 위해 UserIdentityVO를 UserA…
move-hoon cbc73a4
[BOOK-179] refactor: apis - dto 필드에 애플 리프레쉬 토큰 필드 추가
move-hoon 4846f5b
[BOOK-179] refactor: apis - KakaoApiHelper를 KakaoApiManager로 리네이밍 및 예…
move-hoon 22e5809
[BOOK-179] refactor: apis - KakaoApiHelper를 KakaoApiManager로 리네이밍 변경사…
move-hoon 8b1be25
[BOOK-179] chore: apis - TokenService를 RefreshTokenService로 역할에 맞게 리네이밍
move-hoon cc4ecc0
[BOOK-179] delete: apis - JwtConfig 내부에 validate 로직을 구현함으로서 AudienceV…
move-hoon 5345650
[BOOK-179] chore: apis - 사용하지 않는 Import문 제거
move-hoon aa0c320
[BOOK-179] feat: infra, apis - Apple OAuth 연동을 위한 클래스 추가
move-hoon 61d734b
[BOOK-179] refactor: apis, domain - 에러코드 통일화
move-hoon 6b9be47
[BOOK-179] refactor: apis - refreshTokenService로 네이밍 변경한 부분 반영
move-hoon 3c3ed33
[BOOK-179] fix: apis - 누락된 validation 추가
move-hoon 1396a2b
[BOOK-179] feat: infra - Apple OAuth 클라이언트 시크릿 포함 요청 반환 DTO 추가
move-hoon 6e6f071
[BOOK-179] feat: apis - 애플 로그인의 경우 refreshToken을 받아와 DB에 저장하는 기능 추가
move-hoon 16bdc59
[BOOK-179] chore: apis - 명세 한국어로 변경하여 다른 도메인과 통일
move-hoon e8d1968
[BOOK-179] fix: apis - Apple JWT 키 파싱 오류 해결
move-hoon 240ade8
[BOOK-179] chore: apis - Kakao admin-key 환경 변수로 변경
move-hoon 8c23a14
[BOOK-179] refactor: apis, infra - 애플 로그인 시 refreshToken 누락에 대한 에러 코드…
move-hoon 27a4598
[BOOK-179] chore: 코드레빗 collapse_walkthrough를 false로 변경
move-hoon d35387a
[BOOK-179] fix: conflict 해결
move-hoon 5f2fd66
[BOOK-179] chore: apis, domain - 오류 코드 메시지를 한국어로 변경
move-hoon 1a00c0b
[BOOK-179] feat: apis - 유효성 검사를 위한 @Validated 및 @Valid 어노테이션 추가
move-hoon 4d6c201
[BOOK-179] feat: CI/CD - Apple 인증 키를 비밀 파일로 추가
move-hoon 5295456
[BOOK-179] chore: apis, infra - OAuth 설정을 application-external.yml로 이동
move-hoon 464a354
[BOOK-179] refactor: kakao-login.html에 Apple 로그인 기능 개선 및 콜백 처리 추가
move-hoon a4d6823
[BOOK-179] test: apis - ApplicationContext 로딩 실패 오류 해결
move-hoon 52b23f6
[BOOK-179] refactor: apis - ApplePrivateKeyLoader 빈 등록을 test 환경에서 비활성화
move-hoon 13ac77c
[BOOK-179] chore: apis - 테스트용 dummy Aladin API 키 및 Apple OAuth 설정 추가
move-hoon a521bc0
[BOOK-179] chore: gateway - securityconfig 파일 주석 제거
move-hoon be30814
[BOOK-179] refactor: AladinApi 및 AladinRestClient에서 ttbKey를 non-null로 변경
move-hoon fd7d406
[BOOK-179] chore: infra - application-external.yml에서 Apple OAuth 설정의 …
move-hoon 7c1171c
[BOOK-179] refactor: apis - Apple ID 토큰 유효성 검사 시 예외 처리 추가 및 오류 코드 정의
move-hoon c7505ea
[BOOK-179] chore: apis, infra - Aladin API 키 이름을 하이픈 형식으로 변경
move-hoon 3afcb9a
[BOOK-179] refactor: apis - ApplePrivateKeyLoader에서 Apple 개인 키 파싱 시 예…
move-hoon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
apis/src/main/kotlin/org/yapp/apis/auth/dto/request/SaveAppleRefreshTokenRequest.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| package org.yapp.apis.auth.dto.request | ||
|
|
||
| import io.swagger.v3.oas.annotations.media.Schema | ||
| import jakarta.validation.constraints.NotBlank | ||
| import jakarta.validation.constraints.NotNull | ||
| import org.yapp.apis.auth.dto.response.CreateUserResponse | ||
| import org.yapp.apis.auth.strategy.AppleAuthCredentials | ||
| import java.util.UUID | ||
|
|
||
| @Schema( | ||
| name = "SaveAppleRefreshTokenRequest", | ||
| description = "Request DTO for saving Apple refresh token with user ID and authorization code" | ||
| ) | ||
| data class SaveAppleRefreshTokenRequest private constructor( | ||
| @Schema( | ||
| description = "Unique identifier of the user", | ||
| example = "a1b2c3d4-e5f6-7890-1234-56789abcdef0" | ||
| ) | ||
| @field:NotNull(message = "userId must not be null") | ||
| val userId: UUID? = null, | ||
|
|
||
| @Schema( | ||
| description = "Authorization code from Apple OAuth process", | ||
| example = "cdef1234-abcd-5678-efgh-9012ijklmnop" | ||
| ) | ||
| @field:NotBlank(message = "authorizationCode must not be blank") | ||
| val authorizationCode: String? = null, | ||
|
|
||
| @Schema( | ||
| description = "Apple refresh token, nullable if not issued yet", | ||
| example = "apple-refresh-token-example" | ||
| ) | ||
| val appleRefreshToken: String? = null | ||
| ) { | ||
| fun validUserId(): UUID = userId!! | ||
| fun validAuthorizationCode(): String = authorizationCode!! | ||
|
|
||
| companion object { | ||
| fun of( | ||
| userResponse: CreateUserResponse, | ||
| credentials: AppleAuthCredentials | ||
| ): SaveAppleRefreshTokenRequest { | ||
| return SaveAppleRefreshTokenRequest( | ||
| userId = userResponse.id, | ||
| authorizationCode = credentials.authorizationCode, | ||
| appleRefreshToken = userResponse.appleRefreshToken | ||
| ) | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.