From 42349b01824fd84bf247d87fee8aee15976558cc Mon Sep 17 00:00:00 2001 From: luxferre Date: Thu, 28 May 2026 11:10:55 +0100 Subject: [PATCH] docs: auth docstrings Issue: #13 --- src/auth/config.py | 7 +++---- src/auth/constants.py | 6 +----- src/auth/dependencies.py | 14 ++++++-------- src/auth/exceptions.py | 5 ++--- src/auth/models.py | 6 +----- src/auth/router.py | 6 +++--- src/auth/schemas.py | 6 +----- src/auth/service.py | 4 ++-- src/auth/utils.py | 10 +--------- 9 files changed, 20 insertions(+), 44 deletions(-) diff --git a/src/auth/config.py b/src/auth/config.py index 37de6a7..82646d2 100644 --- a/src/auth/config.py +++ b/src/auth/config.py @@ -1,9 +1,8 @@ """ -Configurations for auth module, import auth_settings +Configurations for the auth module -Configurations: - - List: Description - - Configs: Description +Exports: + - auth_settings: Contains OIDC information """ from src.config import CustomBaseSettings diff --git a/src/auth/constants.py b/src/auth/constants.py index 1ab3fd6..faabd82 100644 --- a/src/auth/constants.py +++ b/src/auth/constants.py @@ -1,7 +1,3 @@ """ -Constants and error codes for auth module - -Constants: - - List: Description - - Consts: Description +Constants for the auth module """ \ No newline at end of file diff --git a/src/auth/dependencies.py b/src/auth/dependencies.py index 0cc23a2..f87064a 100644 --- a/src/auth/dependencies.py +++ b/src/auth/dependencies.py @@ -1,13 +1,11 @@ """ -Router dependencies for auth module +Auth dependencies -Classes: - - List: Description - - Classes: Description - -Functions: - - List: Description - - Functions: Description +Exports: + - org_query_user_claims_dependency: bool: Verifies user belongs to org + - org_model_root_claim_query_dependency: org_model: verifies org exists and user is either root or su, gets org from query + - org_model_root_claim_body_dependency: org_model: verifies org exists and user is either root or su, gets org from body + - super_admin_dependency: user_model: verifies the user is a super admin """ from typing import Annotated from fastapi import Depends diff --git a/src/auth/exceptions.py b/src/auth/exceptions.py index 71aede1..613b166 100644 --- a/src/auth/exceptions.py +++ b/src/auth/exceptions.py @@ -1,9 +1,8 @@ """ -Module specific exceptions for auth module +Module specific exceptions for the auth module Exceptions: - - List: Description - - Exceptions: Description + - UnauthorizedException: Takes an optional message string """ from typing import Optional diff --git a/src/auth/models.py b/src/auth/models.py index 487b3d1..4717477 100644 --- a/src/auth/models.py +++ b/src/auth/models.py @@ -1,7 +1,3 @@ """ -Database models for auth module - -Models: - - List: Description - - Models: Description +Database models for the auth module """ \ No newline at end of file diff --git a/src/auth/router.py b/src/auth/router.py index 5e8871d..9cd7fad 100644 --- a/src/auth/router.py +++ b/src/auth/router.py @@ -1,8 +1,8 @@ """ -Router endpoints for auth module -Contains oauth registration +Router endpoints for the auth module -Endpoints: +Exports: + - router: fastapi.APIRouter """ from fastapi import APIRouter diff --git a/src/auth/schemas.py b/src/auth/schemas.py index 92afae5..279bb1b 100644 --- a/src/auth/schemas.py +++ b/src/auth/schemas.py @@ -1,7 +1,3 @@ """ -Pydantic models for auth module - -Models: - - List: Description - - Models: Description +Pydantic models for the auth module """ \ No newline at end of file diff --git a/src/auth/service.py b/src/auth/service.py index e0a764e..dce8217 100644 --- a/src/auth/service.py +++ b/src/auth/service.py @@ -1,8 +1,8 @@ """ -Module specific business logic for auth module +Module specific business logic for the auth module Exports: - - claims_dependency + - claims_dependency: Dict[str, Any] containing OIDC claims and database ID """ import json import requests diff --git a/src/auth/utils.py b/src/auth/utils.py index e913437..ed66e7c 100644 --- a/src/auth/utils.py +++ b/src/auth/utils.py @@ -1,11 +1,3 @@ """ -Non-business logic reusable functions and classes for auth module - -Classes: - - List: Description - - Classes: Description - -Functions: - - List: Description - - Functions: Description +Non-business logic reusable functions and classes for the auth module """ \ No newline at end of file