-
Notifications
You must be signed in to change notification settings - Fork 0
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
[YS-65] feat: 테스트용 토큰 강제 발급 API & AccessToken 갱신 API 구현 #16
Merged
Merged
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
ee8b4ec
style: add line for EOF
Ji-soo708 3560fb0
chore: update springdoc version
Ji-soo708 871ad82
feat: add generateTestTokenForTestMember method for test
Ji-soo708 225f15b
feat: add UseCase interface
Ji-soo708 c83fe2f
feat: add GenerateTestToken api for test member
Ji-soo708 e66f71f
test: change memberId type from String to Long in test code
Ji-soo708 ec088d0
chore: add mock dependency for test
Ji-soo708 e915406
test: add GenerateTestToken test code
Ji-soo708 2f42a22
test: refactor JwtTokenProviderTest to use Kotest style
Ji-soo708 5ae21ef
style: rename dto name
Ji-soo708 8bfa21a
feat: add @ComponentScan to include UseCase beans in application context
Ji-soo708 2387360
refact: refactor TokenProvider code
Ji-soo708 ef72cda
feat: add dto for SignIn logic
Ji-soo708 63d0863
feat: add GenerateTokenWithRefreshToken
Ji-soo708 83b41c1
test: add GenerateTokenWithRefreshToken test code
Ji-soo708 da69998
refact: rename entity
Ji-soo708 65ffa0c
refact: refactor member domain
Ji-soo708 6387bdb
test: fix test due to changed domain
Ji-soo708 c08fad6
feat: add MemberGateway
Ji-soo708 c207cf8
feat: add GetMemberById usecase
Ji-soo708 065c00b
refact: update MemberRefreshToken response
Ji-soo708 6db0c19
style: add line for eof
Ji-soo708 9abb0c3
Merge branch 'dev' into feature/YS-65
Ji-soo708 6a48fbf
style: update role example
Ji-soo708 eb68e03
[YS-31] feat: 구글 OAuth 로그인 구현 (#13)
chock-cho 36a0d1c
feat: add GenerateTestToken api for test member
Ji-soo708 e26fdbf
test: refactor JwtTokenProviderTest to use Kotest style
Ji-soo708 f5c8cab
feat: add @ComponentScan to include UseCase beans in application context
Ji-soo708 170352d
feat: add GenerateTokenWithRefreshToken
Ji-soo708 0f6b999
refact: rename entity
Ji-soo708 aae3d23
test: fix test due to changed domain
Ji-soo708 a333982
refact: update MemberRefreshToken response
Ji-soo708 93550d8
fix: fix conflicts for merge
Ji-soo708 8538d2c
refact: move usecase file to application
Ji-soo708 edca1e9
refact: refactor OAuthLoginResponse response structure
Ji-soo708 7df78cd
fix: fix conflicts for merge
Ji-soo708 fedb6de
fix: fix conflicts for merge
Ji-soo708 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
16 changes: 16 additions & 0 deletions
16
src/main/kotlin/com/dobby/backend/domain/usecase/GetMemberById.kt
This file contains 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,16 @@ | ||
package com.dobby.backend.domain.usecase | ||
|
||
import com.dobby.backend.domain.gateway.MemberGateway | ||
import com.dobby.backend.domain.model.Member | ||
|
||
class GetMemberById( | ||
private val memberGateway: MemberGateway, | ||
) : UseCase<GetMemberById.Input, Member> { | ||
data class Input( | ||
val memberId: Long, | ||
) | ||
|
||
override fun execute(input: Input): Member { | ||
return memberGateway.getById(input.memberId) | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
src/main/kotlin/com/dobby/backend/presentation/api/dto/response/MemberResponse.kt
This file contains 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,36 @@ | ||
package com.dobby.backend.presentation.api.dto.response | ||
|
||
import com.dobby.backend.domain.model.Member | ||
import com.dobby.backend.infrastructure.database.entity.enum.RoleType | ||
import io.swagger.v3.oas.annotations.media.Schema | ||
|
||
@Schema(description = "사용자 DTO") | ||
data class MemberResponse( | ||
@Schema(description = "사용자 ID", example = "1") | ||
val id: Long, | ||
|
||
@Schema(description = "OAuth 이메일", example = "dlawotn3@naver.com") | ||
val oauthEmail: String, | ||
|
||
@Schema(description = "연락 이메일", example = "dlawotn3@naver.com") | ||
val contactEmail: String, | ||
|
||
@Schema(description = "역할", example = "USER") | ||
val role: RoleType, | ||
|
||
@Schema(description = "이름", example = "야뿌") | ||
val name: String, | ||
) { | ||
|
||
companion object { | ||
fun fromDomain(member: Member): MemberResponse = with(member) { | ||
MemberResponse( | ||
id = memberId, | ||
oauthEmail = oauthEmail, | ||
contactEmail = contactEmail, | ||
role = role, | ||
name = name | ||
) | ||
} | ||
} | ||
} |
This file contains 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
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.
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.
저희 요구사항에서는 RoleType이 RESEARCHER, PARTICIPANT로 구분된다는 점 참고 부탁드립니다☺️ !!
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.
이 부분 아까 알아채서 최근 커밋에서 고쳤습니다! 좋은 지적 감사합니다👍🏻