

def authenticate(self, username=None, password=None):
    'Username is case insensitive.'
    try:
        user = User.objects.get(username__iexact=username)
        if user.check_password(password):
            return user
    except User.DoesNotExist:
        return None

dataset/ETHPy150Open kobotoolbox/kobocat/onadata/apps/main/backends.py ModelBackend.authenticate/original