Skip to content

Commit bf2d016

Browse files
committed
Add basic auth to the generic webhook API.
This: * Replaces #5009 * Fixes #4986
1 parent 6d960f1 commit bf2d016

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

readthedocs/restapi/views/integrations.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
from django.shortcuts import get_object_or_404
1010
from rest_framework import permissions, status
11+
from rest_framework.authentication import BasicAuthentication
1112
from rest_framework.exceptions import NotFound, ParseError
1213
from rest_framework.renderers import JSONRenderer
1314
from rest_framework.response import Response
@@ -367,6 +368,7 @@ class APIWebhookView(WebhookMixin, APIView):
367368

368369
integration_type = Integration.API_WEBHOOK
369370
permission_classes = [IsAuthenticatedOrHasToken]
371+
authentication_classes = [BasicAuthentication]
370372

371373
def get_project(self, **kwargs):
372374
"""

0 commit comments

Comments
 (0)