<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def authenticate_user(self, request, user):
 """ returns ``True`` if the password value supplied is a valid user password or a valid user token can be overridden to implement more complex checks """

        return user.check_password(request.data.get('password')) or \
               self.check_user_token(request, user)