Added signature authentication on activitypub view

This commit is contained in:
Eliot Berriot 2018-03-31 18:39:32 +02:00
parent 46d40c7ffa
commit b5a4b2ca6a
No known key found for this signature in database
GPG Key ID: DD6965E2476E5C27
1 changed files with 3 additions and 1 deletions

View File

@ -8,6 +8,7 @@ from rest_framework import response
from rest_framework.decorators import list_route, detail_route
from . import actors
from . import authentication
from . import renderers
from . import serializers
from . import webfinger
@ -23,7 +24,8 @@ class FederationMixin(object):
class InstanceActorViewSet(FederationMixin, viewsets.GenericViewSet):
lookup_field = 'actor'
lookup_value_regex = '[a-z]*'
authentication_classes = []
authentication_classes = [
authentication.SignatureAuthentication]
permission_classes = []
renderer_classes = [renderers.ActivityPubRenderer]