aboutsummaryrefslogtreecommitdiff
path: root/gn_auth/auth/authentication
diff options
context:
space:
mode:
Diffstat (limited to 'gn_auth/auth/authentication')
-rw-r--r--gn_auth/auth/authentication/oauth2/models/oauth2client.py4
-rw-r--r--gn_auth/auth/authentication/users.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/gn_auth/auth/authentication/oauth2/models/oauth2client.py b/gn_auth/auth/authentication/oauth2/models/oauth2client.py
index b140a16..1ea7b06 100644
--- a/gn_auth/auth/authentication/oauth2/models/oauth2client.py
+++ b/gn_auth/auth/authentication/oauth2/models/oauth2client.py
@@ -12,7 +12,7 @@ from pymonad.maybe import Just, Maybe, Nothing
from gn_auth.auth.db import sqlite3 as db
from gn_auth.auth.authentication.users import (User,
- users,
+ fetch_users,
user_by_id,
same_password)
@@ -236,7 +236,7 @@ def oauth2_clients(conn: db.DbConnection) -> tuple[OAuth2Client, ...]:
cursor.execute("SELECT * FROM oauth2_clients")
clients_rs = cursor.fetchall()
the_users = {
- usr.user_id: usr for usr in users(
+ usr.user_id: usr for usr in fetch_users(
conn, tuple({UUID(result["user_id"])
for result in clients_rs}))
}
diff --git a/gn_auth/auth/authentication/users.py b/gn_auth/auth/authentication/users.py
index 2f8caa1..7a41a14 100644
--- a/gn_auth/auth/authentication/users.py
+++ b/gn_auth/auth/authentication/users.py
@@ -107,7 +107,7 @@ def set_user_password(
{"user_id": str(user.user_id), "hash": hashed_password})
return user, hashed_password
-def users(conn: db.DbConnection,
+def fetch_users(conn: db.DbConnection,
ids: tuple[UUID, ...] = tuple()) -> tuple[User, ...]:
"""
Fetch all users with the given `ids`. If `ids` is empty, return ALL users.