Skip to content
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

[Step2] 리펙터링 #6

Open
wants to merge 9 commits into
base: hyunssooo
Choose a base branch
from
Prev Previous commit
Next Next commit
refactor: 사용하지 않는 코드 제거
hyunssooo committed Dec 12, 2022
commit fc595d1e90ae8c11abcfae1fa06646836613bb98
Original file line number Diff line number Diff line change
@@ -12,7 +12,6 @@
import nextstep.security.authorization.manager.RoleManager;
import nextstep.security.config.AuthorizeRequestMatcherRegistry;
import nextstep.security.context.SecurityContextHolder;
import nextstep.security.exception.AccessDeniedException;
import nextstep.security.exception.AuthenticationException;
import nextstep.security.exception.AuthorizationException;
import org.springframework.http.HttpStatus;
@@ -42,7 +41,6 @@ public void doFilter(
final RoleManager roleManager = authorizeRequestMatcherRegistry.getRoleManager((HttpServletRequest) request);

if (roleManager == null) {
chain.doFilter(request, response);
return;
}

@@ -62,12 +60,6 @@ public void doFilter(
HttpStatus.FORBIDDEN.getReasonPhrase()
);
return;
} catch (AccessDeniedException e) {
((HttpServletResponse) response).sendError(
HttpStatus.BAD_REQUEST.value(),
HttpStatus.BAD_REQUEST.getReasonPhrase()
);
return;
}

chain.doFilter(request, response);

This file was deleted.