From 2c62d5a425fa03008be11e7498df3b300d413115 Mon Sep 17 00:00:00 2001 From: Arne Baumann Date: Thu, 18 Jun 2026 08:08:57 +0200 Subject: [PATCH] fix: internal super admin cookie schema name --- src/aignostics_foundry_core/api/auth.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/aignostics_foundry_core/api/auth.py b/src/aignostics_foundry_core/api/auth.py index 520e53c..e145c19 100644 --- a/src/aignostics_foundry_core/api/auth.py +++ b/src/aignostics_foundry_core/api/auth.py @@ -230,6 +230,16 @@ def get_auth_client(request: Request) -> AuthClient: auto_error=False, ) # Security scheme for internal admin endpoints +auth0_internal_superadmin_scheme = APIKeyCookie( + name=AUTH0_SESSION_COOKIE_NAME, + scheme_name=AUTH0_COOKIE_SCHEME_NAME, + description=( + "Auth0 session cookie authentication with internal organization membership AND superadmin role requirements. " + f"User must be a member of the internal organization AND have '{AUTH0_ROLE_SUPERADMIN}' role." + ), + auto_error=False, +) # Security scheme for internal superadmin endpoints + auth0_bearer_scheme = HTTPBearer( scheme_name=AUTH0_BEARER_SCHEME_NAME, description="Auth0 JWT Bearer token authentication.", @@ -259,16 +269,6 @@ def get_auth_client(request: Request) -> AuthClient: auto_error=False, ) -auth0_internal_superadmin_scheme = APIKeyCookie( - name=AUTH0_SESSION_COOKIE_NAME, - scheme_name="Auth0InternalSuperadminCookie", - description=( - "Auth0 session cookie authentication with internal organization membership AND superadmin role requirements. " - f"User must be a member of the internal organization AND have '{AUTH0_ROLE_SUPERADMIN}' role." - ), - auto_error=False, -) # Security scheme for internal superadmin endpoints - auth0_internal_superadmin_bearer_scheme = HTTPBearer( scheme_name=AUTH0_BEARER_SCHEME_NAME, description=(