Class STAuthenticationEntryPoint
java.lang.Object
it.uniroma2.art.semanticturkey.security.STAuthenticationEntryPoint
- All Implemented Interfaces:
org.springframework.security.web.AuthenticationEntryPoint
public class STAuthenticationEntryPoint
extends Object
implements org.springframework.security.web.AuthenticationEntryPoint
- Author:
- Tiziano We need a custom authenticationEntryPoint because default Spring-Security config will redirect to login page when a not authenticated user performs a request. In our case we need just a https status 401 and a json response. (Referenced in WEB-INF/spring-security.xml)
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
commence
(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.security.core.AuthenticationException authException)
-
Constructor Details
-
STAuthenticationEntryPoint
public STAuthenticationEntryPoint()
-
-
Method Details
-
commence
public void commence(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.security.core.AuthenticationException authException) throws IOException - Specified by:
commence
in interfaceorg.springframework.security.web.AuthenticationEntryPoint
- Throws:
IOException
-