From 14cd182a9c3dc6347745cef6a1e33946d03d4c55 Mon Sep 17 00:00:00 2001 From: Lucas ONeil Date: Fri, 23 Feb 2024 15:23:39 -0800 Subject: [PATCH] Add indexes Signed-off-by: Lucas ONeil --- oidc-controller/api/db/session.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/oidc-controller/api/db/session.py b/oidc-controller/api/db/session.py index 2d8f31ae..a76bd43b 100644 --- a/oidc-controller/api/db/session.py +++ b/oidc-controller/api/db/session.py @@ -19,6 +19,9 @@ async def init_db(): client_configs = db.get_collection(COLLECTION_NAMES.CLIENT_CONFIGURATIONS) client_configs.create_index([("client_id", ASCENDING)], unique=True) + auth_session = db.get_collection(COLLECTION_NAMES.AUTH_SESSION) + auth_session.create_index([("pres_exch_id", ASCENDING)], unique=True) + auth_session.create_index([("pyop_auth_code", ASCENDING)], unique=True) async def get_db(): return client[settings.DB_NAME]