From 3b8d7421b12cf6fb8541a1fa46b56573f91ffab1 Mon Sep 17 00:00:00 2001 From: Colin Powell Date: Fri, 15 May 2026 10:53:47 -0400 Subject: [PATCH] [webhooks] Fix auth for Emacs webhooks --- vrobbler/apps/tasks/webhooks.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vrobbler/apps/tasks/webhooks.py b/vrobbler/apps/tasks/webhooks.py index 39a2c3f..d8fd563 100644 --- a/vrobbler/apps/tasks/webhooks.py +++ b/vrobbler/apps/tasks/webhooks.py @@ -6,7 +6,7 @@ from django.views.decorators.csrf import csrf_exempt from django.utils.decorators import method_decorator from profiles.models import UserProfile from rest_framework import status -from rest_framework.authentication import BaseAuthentication +from rest_framework.authentication import BaseAuthentication, TokenAuthentication from rest_framework.exceptions import AuthenticationFailed from rest_framework.permissions import IsAuthenticated from rest_framework.response import Response @@ -187,6 +187,9 @@ class TodoistWebhookView(APIView): class EmacsWebhookView(APIView): + authentication_classes = [TokenAuthentication] + permission_classes = [IsAuthenticated] + @property def logger(self): return logger