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

Last change on this file since cf9cdbf was cf9cdbf, checked in by Gjoko <goko_kostadinov@…>, 21 months ago

Initial commit.

  • Property mode set to 100644
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.