Class PlayerRegistrationHandlerInterceptor

java.lang.Object
net.andresbustamante.yafoot.core.web.util.PlayerRegistrationHandlerInterceptor
All Implemented Interfaces:
org.springframework.web.servlet.HandlerInterceptor

public class PlayerRegistrationHandlerInterceptor extends Object implements org.springframework.web.servlet.HandlerInterceptor
Intercepts every http call to check if the player is already registered. Otherwise, it will create the player using the authenticated principal data.
  • Constructor Details

    • PlayerRegistrationHandlerInterceptor

      public PlayerRegistrationHandlerInterceptor(PlayerManagementService playerManagementService, PlayerSearchService playerSearchService)
      Public constructor.
      Parameters:
      playerManagementService -
      playerSearchService -
  • Method Details

    • preHandle

      public boolean preHandle(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Object handler) throws Exception
      Specified by:
      preHandle in interface org.springframework.web.servlet.HandlerInterceptor
      Throws:
      Exception