[scrobbles] Use Bearer token keyword
This commit is contained in:
@ -14,6 +14,15 @@ from django.core.paginator import EmptyPage, PageNotAnInteger, Paginator
|
||||
from django.db.models import Count, Max, Q
|
||||
from django.db.models.query import QuerySet
|
||||
from rest_framework.authentication import TokenAuthentication
|
||||
from rest_framework.authtoken.views import ObtainAuthToken
|
||||
from rest_framework.authtoken.models import Token
|
||||
from rest_framework.permissions import IsAuthenticated
|
||||
|
||||
|
||||
class BearerTokenAuthentication(TokenAuthentication):
|
||||
keyword = "Bearer"
|
||||
|
||||
|
||||
from django.http import (
|
||||
FileResponse,
|
||||
Http404,
|
||||
@ -84,7 +93,7 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
class WebhookView(APIView):
|
||||
permission_classes = [IsAuthenticated]
|
||||
authentication_classes = [TokenAuthentication]
|
||||
authentication_classes = [BearerTokenAuthentication]
|
||||
|
||||
@property
|
||||
def logger(self):
|
||||
|
||||
Reference in New Issue
Block a user