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

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    commence(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.security.core.AuthenticationException authException)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 interface org.springframework.security.web.AuthenticationEntryPoint
      Throws:
      IOException
      jakarta.servlet.ServletException