Open
Conversation
kfdsy0103
approved these changes
Dec 21, 2025
Collaborator
kfdsy0103
left a comment
There was a problem hiding this comment.
10주차 워크북 수행하시느라 수고 많으셨어요 미녁!
리뷰 확인 후 머지 부탁드립니다!
Comment on lines
+42
to
+47
| @PostMapping("/login") | ||
| ApiResponse<MemberResDTO.LoginDTO> login( | ||
| @RequestBody @Valid MemberReqDTO.LoginDTO dto | ||
| ) { | ||
| return ApiResponse.onSuccess(MemberSuccessCode.FOUND, memberQueryService.login(dto)); | ||
| } |
Collaborator
There was a problem hiding this comment.
로그인/회원가입 같은 권한 관련 코드는 따로 Auth 패키지 파서 분리해줘도 좋아보여요!
Comment on lines
+38
to
+55
| http | ||
| .authorizeHttpRequests(requests -> requests | ||
| .requestMatchers(allowUris).permitAll() | ||
| .requestMatchers("/admin/**").hasRole("ADMIN") | ||
| .anyRequest().authenticated() | ||
| ) | ||
| // 폼로그인 비활성화 | ||
| .formLogin(AbstractHttpConfigurer::disable) | ||
| // JwtAuthFilter를 UsernamePasswordAuthenticationFilter | ||
| .addFilterBefore(jwtAuthFilter(), UsernamePasswordAuthenticationFilter.class) | ||
| .csrf(AbstractHttpConfigurer::disable) | ||
| .logout(logout -> logout | ||
| .logoutUrl("/logout") | ||
| .logoutSuccessUrl("/login?logout") | ||
| .permitAll() | ||
| ) | ||
| .exceptionHandling(exception -> exception.authenticationEntryPoint(authenticationEntryPoint())) | ||
|
|
Collaborator
There was a problem hiding this comment.
JWT를 사용하는 경우 session 비활성화를 명시해주는 것도 좋아보여요!
http
.sessionManagement(session ->
session.sessionCreationPolicy(SessionCreationPolicy.STATELESS)
)
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
✅ 실습 체크리스트
✅ 컨벤션 체크리스트
📌 주안점