code: def authenticate(self, user, password):
          
          assert user['password_hash'] == '_'.join((password, 'hash'))
          self.logger.debug('User %s has been successfully authenticated',
                            user['uid'])
docs: Authenticate user.