def check_username_password(self, email: str, password: str, db: Session) -> Any: """ Verify Password""" db_user_info = get_user(email=email, db=db) return passutil.verify_password(str(password), str(db_user_info.password))
def check_password(self, user_id: str, password: str, db: Session): """ get user Password""" try: db_user = db.query(models.User.password).filter( models.User.id == user_id).first() return passutil.verify_password(str(password), str(db_user.password)) except SQLAlchemyError as e: return None
def check_password(self, user_id: int, password: str): """ get user Password""" try: db_user = dbconf_models.User.objects(id=user_id).first() return passutil.verify_password(str(password), str(db_user.password)) except Exception as e: fastapi_logger.exception("get_password") return None