diff --git a/ungleichotpserver/otpauth/views.py b/ungleichotpserver/otpauth/views.py index 234903b..702ae47 100644 --- a/ungleichotpserver/otpauth/views.py +++ b/ungleichotpserver/otpauth/views.py @@ -16,9 +16,15 @@ class OTPVerifyViewSet(viewsets.ModelViewSet): @action(detail=False, methods=['post']) 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) if serializer.is_valid(): - # print(serializer) serializer.save() return Response({'status': 'OK'})