Class RestAuthEntryPoint

java.lang.Object
ubic.gemma.rest.security.RestAuthEntryPoint
All Implemented Interfaces:
org.springframework.security.web.AuthenticationEntryPoint

@Component("restAuthEntryPoint") public class RestAuthEntryPoint extends Object implements org.springframework.security.web.AuthenticationEntryPoint
Implementation of AuthenticationEntryPoint for the RESTful API to handle authentication.

Promoted to @Component("restAuthEntryPoint") as part of Phase 1 of GEMMA_REST_STANDALONE_RECCE.md so the bean is producible without gemma-web's applicationContext-security.xml. The matching XML bean definition in gemma-web/applicationContext-security.xml was removed to avoid a bean-id collision; the <s:http pattern="/rest/v2/**"> chain in that XML still resolves entry-point-ref="restAuthEntryPoint" by name from this component.

Referenced by RestSecurityConfig.restSecurityFilterChain(HttpSecurity, AuthenticationEntryPoint, AuthenticationManager, TokenStore) via @Qualifier("restAuthEntryPoint").

  • Constructor Summary

    Constructors
    Constructor
    Description
    RestAuthEntryPoint(com.fasterxml.jackson.databind.ObjectMapper objectMapper, Future<io.swagger.v3.oas.models.OpenAPI> openAPI, BuildInfo buildInfo)
     
  • 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 Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RestAuthEntryPoint

      public RestAuthEntryPoint(com.fasterxml.jackson.databind.ObjectMapper objectMapper, @Qualifier("openApi") Future<io.swagger.v3.oas.models.OpenAPI> openAPI, BuildInfo buildInfo)
  • 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 interface org.springframework.security.web.AuthenticationEntryPoint
      Throws:
      IOException