source: src/main/java/edu/gjoko/schedlr/config/AppAuthenticationEntryPoint.java@ 77205be

Last change on this file since 77205be was 77205be, checked in by gjoko kostadinov <gjokokostadinov@…>, 6 months ago

Add entire code

  • Property mode set to 100755
File size: 665 bytes
Line 
1package edu.gjoko.schedlr.config;
2
3import org.springframework.security.core.AuthenticationException;
4import org.springframework.security.web.AuthenticationEntryPoint;
5
6import javax.servlet.ServletException;
7import javax.servlet.http.HttpServletRequest;
8import javax.servlet.http.HttpServletResponse;
9import java.io.IOException;
10
11public class AppAuthenticationEntryPoint implements AuthenticationEntryPoint {
12 @Override
13 public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException authException) throws IOException, ServletException {
14 response.setStatus(403);
15 response.sendRedirect("/login");
16 }
17}
Note: See TracBrowser for help on using the repository browser.