Skip to content

Commit

Permalink
Refactored Http403ForbiddenEntryPoint to use HttpStatus.FORBIDDEN.val…
Browse files Browse the repository at this point in the history
…ue()
  • Loading branch information
yelm-212 committed Feb 18, 2025
1 parent 776eb76 commit bb1bd8c
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import org.springframework.http.HttpStatus;
import org.springframework.security.core.AuthenticationException;
import org.springframework.security.web.AuthenticationEntryPoint;

Expand Down Expand Up @@ -55,7 +56,7 @@ public class Http403ForbiddenEntryPoint implements AuthenticationEntryPoint {
public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException arg2)
throws IOException {
logger.debug("Pre-authenticated entry point called. Rejecting access");
response.sendError(HttpServletResponse.SC_FORBIDDEN, "Access Denied");
response.sendError(HttpStatus.FORBIDDEN.value(), HttpStatus.FORBIDDEN.getReasonPhrase());
}

}

0 comments on commit bb1bd8c

Please sign in to comment.