Last change
on this file since f29cd58 was 77205be, checked in by gjoko kostadinov <gjokokostadinov@…>, 8 months ago |
Add entire code
|
-
Property mode
set to
100755
|
File size:
665 bytes
|
Rev | Line | |
---|
[cf9cdbf] | 1 | package edu.gjoko.schedlr.config;
|
---|
| 2 |
|
---|
| 3 | import org.springframework.security.core.AuthenticationException;
|
---|
| 4 | import org.springframework.security.web.AuthenticationEntryPoint;
|
---|
| 5 |
|
---|
| 6 | import javax.servlet.ServletException;
|
---|
| 7 | import javax.servlet.http.HttpServletRequest;
|
---|
| 8 | import javax.servlet.http.HttpServletResponse;
|
---|
| 9 | import java.io.IOException;
|
---|
| 10 |
|
---|
| 11 | public 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.