def is_authenticated(self, request, **kwargs):
        if request.method == "GET":
            return True

        from .core.auth import User

        username = request.GET.get("username") or request.POST.get("username")
        api_key = request.GET.get("api_key") or request.POST.get("api_key")

        if not username or not api_key:
            if not username:  # pragma: no cover
                logger.debug("no username")  # pragma: no cover
            elif not api_key:  # pragma: no cover
                logger.debug("no api key")  # pragma: no cover
            return self._unauthorized()

        try:
            user = User.objects.get(username=username)
        except (User.DoesNotExist, User.MultipleObjectsReturned):
            logger.debug("user retrieval error")
            return self._unauthorized()

        request.user = user
        return self.get_key(user, api_key)
Finds the user and checks their API key. GET requests are always
dataset/ETHPy150Open mozilla/moztrap/moztrap/model/mtapi.py/MTApiKeyAuthentication.is_authenticated