-
Notifications
You must be signed in to change notification settings - Fork 3
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
[BE] feat: 인증 ArgumentResolver 구현 및 API 문서화 #167
Conversation
…owacourse-teams/2024-friendogly into feature/authorization-argumentResolve
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.
Controller 테스트까지 꼼꼼하게 잘 작성하셨네요 굿굿
고생하셧슴당
//tasks.withType(GenerateSwaggerUI) { | ||
// dependsOn 'openapi3' | ||
//} | ||
|
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.
필요없는건 지워도 될 것 같아욥
if (authorizationValue == null) { | ||
throw new FriendoglyException("로그인 후에 사용할 수 있습니다."); | ||
} |
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.
인증 관련된 예외는 따로 만들어도 좋을 것 같아요. 401
@@ -29,8 +31,11 @@ public PetController(PetQueryService petQueryService, PetCommandService petComma | |||
} | |||
|
|||
@PostMapping | |||
public ResponseEntity<SavePetResponse> savePet(@RequestBody @Valid SavePetRequest savePetRequest) { | |||
SavePetResponse response = petCommandService.savePet(savePetRequest); | |||
public ResponseEntity<SavePetResponse> savePet( |
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.
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.
이거 해커톤때 내가 했던건뎅 크크
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.
ArgumentReslover랑 헤더문서에 적용한 거 좋네요~!
@@ -29,8 +31,11 @@ public PetController(PetQueryService petQueryService, PetCommandService petComma | |||
} | |||
|
|||
@PostMapping | |||
public ResponseEntity<SavePetResponse> savePet(@RequestBody @Valid SavePetRequest savePetRequest) { | |||
SavePetResponse response = petCommandService.savePet(savePetRequest); | |||
public ResponseEntity<SavePetResponse> savePet( |
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.
이거 해커톤때 내가 했던건뎅 크크
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.
깔끔하게 잘 구현하셨네요~!!!
다른 크루가 리뷰 잘 남겨주어서 바로 approve할게요~
이슈
개발 사항
전달 사항
@Auth
어노테이션 걸어주시면 ArgumentResolver가 Authorization 헤더에서 값 꺼내서 넣어줍니다.