def is_authenticated(self, request, **kwargs):
        try:
            username, password = self.extract_credentials(request)
        except ValueError:
            return self._unauthorized()

        if not username or not password:
            return self._unauthorized()

        if self.backend:
            user = self.backend.authenticate(
                username=username,
                password=password
            )
        else:
            user = authenticate(username=username, password=password)

        if user is None:
            return self._unauthorized()

        if not self.check_active(user):
            return False

        request.user = user
        return True
Return a :class:`.History` record for the given object
dataset/ETHPy150Open django-tastypie/django-tastypie/tastypie/authentication.py/BasicAuthentication.is_authenticated--crossover with--dataset/ETHPy150Open RoseOu/flasky/venv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.py/get_history