Skip to content

Commit

Permalink
Merge pull request #47 from 9oormthon-univ/hyundong
Browse files Browse the repository at this point in the history
fix :: 로그인 401 에러로 security config 재수정
  • Loading branch information
hyundong-L authored Nov 26, 2024
2 parents ca8f27a + d915b53 commit bfe825a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ public LoginResponseDto login(HttpServletResponse response, KakaoLoginParam para
userInfo.updateRefreshToken(tokenDto.getRefreshToken());
TokenUtil.saveRefreshToken(response, tokenDto.getRefreshToken());

log.info(params.getAuthorizationCode());

return LoginResponseDto.builder()
.isNewUser(userInfo.getBirthDate() == null)
.username(userInfo.getNickname())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
.authenticationEntryPoint(jwtAuthenticationEntryPoint)
.accessDeniedHandler(jwtAccessDeniedHandler);
})
.authorizeHttpRequests((authorizeRequests) -> authorizeRequests.anyRequest().authenticated())
.authorizeHttpRequests(
authorizeRequests -> authorizeRequests
.requestMatchers("/swagger-ui/**", "/v3/api-docs/**", "/api/auth/**").permitAll()
.anyRequest().authenticated()
)
.addFilterBefore(new JwtAuthorizationFilter(tokenProvider), UsernamePasswordAuthenticationFilter.class)
.addFilterBefore(new JwtExceptionFilter(), JwtAuthorizationFilter.class);

Expand Down

0 comments on commit bfe825a

Please sign in to comment.