-
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
[BG-137]: JWT 발행 (6h / 3h) #8
Conversation
data class WorkspaceCreateDto( | ||
val userId: UUID, | ||
val name: String, | ||
var name: String = "", |
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.
이거 이런식으로 디폴트 값이 들어가야 RequestBody
에 넣을 수 있던데
더 좋은방법 있을까?
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.
security쪽 패키지 구조는 어떤 것 같닝?
아무래도 좀 고민을 많이 하고 넣진 않았는뎅
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.
👍 고생했어
val authConfig: AuthConfig, | ||
val authFacade: AuthFacade, |
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.
private 붙여 주는게 좋을듯
@@ -13,6 +13,8 @@ repositories { | |||
dependencies { | |||
implementation(project(":domain")) | |||
implementation("org.springframework.boot:spring-boot-starter-web") | |||
implementation("org.springframework.boot:spring-boot-starter-security") | |||
implementation("com.auth0:java-jwt:3.18.3") |
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.
처음 보는데 jjwt 안쓰고 사용한 이유 있어?
userRepository.save(create.toEntity()), | ||
) | ||
|
||
fun saveOrGetUser(user: UserCreateDto): UserDto = |
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.
@Transactional
을 추가하는게 좋을듯
import java.util.Date | ||
import java.util.UUID | ||
|
||
@Service |
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.
@Component
로 하는게 더 좋아보여 @Transactional
이 없으니깐
} | ||
} catch (e: Exception) { | ||
// TODO exception handling | ||
throw IllegalArgumentException("Invalid token") |
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.
여기서 Exception을 던졌을 때 jwtAuthenticationEntryPoint
까지 도달하는지 테스트 해봐야 할듯
handler, filter, component 식으로 분리 시켜도 좋을거 같은데 |
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.
👍
Why
Mockk
첫 도입등으로 작업이 지연됨
Result
@AuthenticationPrincipal
어노테이션 기반의 argumentResolver를 사용한 인가Prize
Mockk
처음 사용해 봄Reference
Link
BG-137