Package no.idata1002.group19
Class AuthEntryPoint
java.lang.Object
no.idata1002.group19.AuthEntryPoint
- All Implemented Interfaces:
org.springframework.security.web.AuthenticationEntryPoint
@Component
public class AuthEntryPoint
extends Object
implements org.springframework.security.web.AuthenticationEntryPoint
Represents an component that implements the AuthenticationEntryPoint
interface. Contains a method to handle authenticaton and sends an HTTP
unauthorized response with JSON error message.
- Since:
- 16.04.2023
- Version:
- 16.04.2023
- Author:
- Group19
-
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
-
AuthEntryPoint
public AuthEntryPoint()
-
-
Method Details
-
commence
public void commence(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.security.core.AuthenticationException authException) throws IOException, jakarta.servlet.ServletException - Specified by:
commence
in interfaceorg.springframework.security.web.AuthenticationEntryPoint
- Throws:
IOException
jakarta.servlet.ServletException
-