title: How to make Django rest_framework Session Authentication case insensitive?
body: <p>I'm using Django rest framework basic authentication with the following code:</p>
  
  <pre><code>class MyBasicAuthentication(BasicAuthentication):
  
      def authenticate_header(self, request):
          return 'xBasic realm="%s"' % self.www_authenticate_realm
  
  
  class AuthView(APIView):
      authentication_classes = (MyBasicAuthentication,)
      serializer_class = UserSerializer
  
      def post(self, request, *args, **kwargs):
          user = authenticate(username=request.user.username, password=request.user.password)
          login(request, user)
  
          response = get_user_basic_info(request.user)
  
          return Response(response)
  </code></pre>
  
  <p>It is working fine, but I need to make this authentication case insensitive for the username. Any suggestions?</p>