add hint why stuff works

This commit is contained in:
Nico Schottelius 2018-12-24 20:58:08 +01:00
parent 8636d3f81a
commit 6377187004

View file

@ -16,9 +16,15 @@ class OTPVerifyViewSet(viewsets.ModelViewSet):
@action(detail=False, methods=['post']) @action(detail=False, methods=['post'])
def verify(self, request): def verify(self, request):
"""the standard serializer above already verified that
(name, realm, token) is valid.
Now we inspect the verify-prefixed names and return ok,
if they also verify
"""
serializer = VerifySerializer(data=request.data) serializer = VerifySerializer(data=request.data)
if serializer.is_valid(): if serializer.is_valid():
# print(serializer)
serializer.save() serializer.save()
return Response({'status': 'OK'}) return Response({'status': 'OK'})