docs: def add_access_controller(self, name: str, func: Callable, endpoint: bool = False):
          """Add an access controller.
  
          If `name` is None it is added at application level, else if is
          considered as a blueprint name. If `endpoint` is True then it is
          considered as an endpoint.
          """
          auth_state = self.extensions[auth_service.name]
          adder = auth_state.add_bp_access_controller
  
          if endpoint:
              adder = auth_state.add_endpoint_access_controller
              if not isinstance(name, str):
                  msg = "{} is not a valid endpoint name".format(repr(name))
                  raise ValueError(msg)
  
          adder(name, func)