Skip to content

Commit

Permalink
fix: 리프레시 토큰은 필터 안거치게 슛
Browse files Browse the repository at this point in the history
  • Loading branch information
seokbeom00 committed May 30, 2024
1 parent eabbf25 commit 6bed1b8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class SecurityConfig {
private final CustomJwtAuthenticationEntryPoint customJwtAuthenticationEntryPoint;
private final CustomAccessDeniedHandler customAccessDeniedHandler;

private static final String[] AUTH_WHITE_LIST = {"/api/v1/member"};
private static final String[] AUTH_WHITE_LIST = {"/api/v1/member", "/api/v1/member/refresh"};

@Bean
SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,25 @@ public ResponseEntity<UserJoinResponse> createMember(
userJoinResponse
);
}
@PostMapping("/refresh")
public ResponseEntity<UserJoinResponse> refreshAccessToken() {
UserJoinResponse userJoinResponse = memberService.createMember(memberCreateDto);
return ResponseEntity.status(HttpStatus.CREATED)
.header("Location", userJoinResponse.userId())
.body(
userJoinResponse
);
}

@GetMapping("/{memberId}")
public ResponseEntity<MemberFindDto> findMemberById(@PathVariable Long memberId) {
return ResponseEntity.ok(memberService.findMemberById(memberId));
}

@DeleteMapping("/{memberId}")
public ResponseEntity deleteMemberById(@PathVariable Long memberId){
public ResponseEntity deleteMemberById(
@PathVariable Long memberId
){
memberService.deleteMemberById(memberId);
return ResponseEntity.noContent().build();
}
Expand Down

0 comments on commit 6bed1b8

Please sign in to comment.