Skip to content

Commit

Permalink
✨ Feat: V2 API 시큐리티 설정
Browse files Browse the repository at this point in the history
  • Loading branch information
swa07016 committed Dec 8, 2023
1 parent b9a6239 commit 4d69863
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/main/java/briefing/briefing/api/BriefingApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ public class BriefingApi {
public CommonResponse<BriefingResponseDTO.BriefingPreviewListDTOV2> findBriefingsV2(
@ParameterObject @ModelAttribute BriefingRequestParam.BriefingPreviewListParam params
) {

List<Briefing> briefingList = briefingQueryService.findBriefings(params, APIVersion.V2);
return CommonResponse.onSuccess(BriefingConverter.toBriefingPreviewListDTOV2(params.getDate(), briefingList));
}
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/briefing/security/config/SecurityConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,12 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
.authorizeHttpRequests(authorize -> {
authorize.requestMatchers("/v2/briefings/**").permitAll(); // 모두 접근 가능합니다.
authorize.requestMatchers("/briefings/**").permitAll(); // 모두 접근 가능합니다.
authorize.requestMatchers("/v2/members/auth/**").permitAll();
authorize.requestMatchers("/members/auth/**").permitAll();
authorize.requestMatchers("/chattings/**").permitAll();
authorize.requestMatchers(HttpMethod.DELETE, "/v2/members/{memberId}").authenticated();
authorize.requestMatchers(HttpMethod.DELETE, "/members/{memberId}").authenticated();
authorize.requestMatchers("/v2/scraps/**").authenticated();
authorize.requestMatchers("/scraps/**").authenticated();
authorize.anyRequest().authenticated();
})
Expand Down

0 comments on commit 4d69863

Please sign in to comment.