text: from modules.api.handlers.abstracts.error_code_handler import ErrorCodeHandler
  from modules.api.objects.response import Response
  from modules.auth.managers.session_manager import SessionManager
  
  
  def auth_ajax_middleware(func):
      """ Ajax authentication middleware
      Args:
          func:
      """
      def wrapper(*args, **kwargs):
          session_manager: SessionManager = SessionManager()
          if session_manager.get_login_user() is None:
              return Response([], "Access Denied", ErrorCodeHandler.FORBIDDEN).get_response()
          return func(*args, **kwargs)
      return wrapper
  