diff --git a/demo/database_auth/db_auth.py b/demo/database_auth/db_auth.py index 3c3eb93..72b1ad2 100644 --- a/demo/database_auth/db_auth.py +++ b/demo/database_auth/db_auth.py @@ -57,6 +57,6 @@ async def check_credentials(db_engine, username, password): ret = await conn.execute(query) user = await ret.fetchone() if user is not None: - hash = user[2] - return sha256_crypt.verify(password, hash) + hashed = user[2] + return sha256_crypt.verify(password, hashed) return False diff --git a/docs/example_db_auth.rst b/docs/example_db_auth.rst index 5e9463a..1b11781 100644 --- a/docs/example_db_auth.rst +++ b/docs/example_db_auth.rst @@ -53,7 +53,7 @@ Now you have two tables: +-----------------+ | user_id | +-----------------+ -| permission_name | +| perm_name | +-----------------+