title: "Authentication credentials were not provided." and terminal says Unauthorized: /api/auth/login/ django-rest-framework
body: <p>I am using postman. when i do a post request to api/auth/login/, I get a 401 response "Authentication credentials were not provided.". In terminal, I do not get my print statement inside of the login serializer, I get Unauthorized: /api/auth/login/. This is my code:
  settings.py </p>
  
  <pre><code>#just including the rest framework one here
  REST_FRAMEWORK = {
      # Use Django's standard `django.contrib.auth` permissions,
      # or allow read-only access for unauthenticated users.
      'DEFAULT_AUTHENTICATION_CLASSES': 
         (
          'knox.auth.TokenAuthentication',
          'rest_framework.authentication.TokenAuthentication',
         ),
     'DEFAULT_PERMISSION_CLASSES': ('rest_framework.permissions.IsAdminUser',)
  }
  </code></pre>
  
  <p>views.py</p>
  
  <pre><code>#just everything user related
  class UserSerializer(serializers.ModelSerializer):
      class Meta:
          model = User
          fields = ('id', 'username')
  
  class LoginUserSerializer(serializers.Serializer):
      username = serializers.CharField()
      password = serializers.CharField()
  
      def validate(self, data):
          user = authenticate(**data)
          print(user)
          if user:# and user.is_active:
              return user
          print("failed")
          raise serializers.ValidationError("No no to log in with provided credentials.")
  #Views
  class RegistrationAPI(generics.GenericAPIView):
      serializer_class = CreateUserSerializer
  
      def post(self, request, *args, **kwargs):
          serializer = self.get_serializer(data=request.data)
          serializer.is_valid(raise_exception=True)
          user = serializer.save()
          return Response({
              "user": UserSerializer(user, context=self.get_serializer_context()).data,
              "token": AuthToken.objects.create(user)[1]
          })
  
  class LoginAPI(generics.GenericAPIView):
      serializer_class = LoginUserSerializer
      def post(self, request, *args, **kwargs):
          serializer = self.get_serializer(data=request.data)
          serializer.is_valid(raise_exception=True)
          user = serializer.validated_data
          return Response({
              "user": UserSerializer(user, context=self.get_serializer_context()).data,
              "token": AuthToken.objects.create(user)
          })
  </code></pre>
  
  <p>urls.py</p>
  
  <pre><code>router = routers.DefaultRouter()
  router.register('api/games', GameViewset, 'games-name')
  
  urlpatterns = [
      re_path(r"^", include(router.urls)),
      re_path(r'^api/auth/', include('knox.urls')),
      re_path(r"^api/auth/register/$", RegistrationAPI.as_view()),
      re_path(r"^api/auth/login/$", LoginAPI.as_view())
  ]
  </code></pre>