fix: commit semantic repair changes

This commit is contained in:
2026-03-21 11:22:25 +03:00
parent 0900208c1a
commit abee05558f
272 changed files with 4603 additions and 1668 deletions

View File

@@ -1,11 +1,11 @@
# [DEF:backend.src.core.auth.jwt:Module]
# [DEF:AuthJwtModule:Module]
#
# @COMPLEXITY: 3
# @SEMANTICS: jwt, token, session, auth
# @PURPOSE: JWT token generation and validation logic.
# @LAYER: Core
# @RELATION: DEPENDS_ON -> jose
# @RELATION: USES -> backend.src.core.auth.config.auth_config
# @RELATION: USES -> auth_config
#
# @INVARIANT: Tokens must include expiration time and user identifier.
@@ -21,6 +21,7 @@ from ..logger import belief_scope
# @PURPOSE: Generates a new JWT access token.
# @PRE: data dict contains 'sub' (user_id) and optional 'scopes' (roles).
# @POST: Returns a signed JWT string.
# @RELATION: DEPENDS_ON -> auth_config
#
# @PARAM: data (dict) - Payload data for the token.
# @PARAM: expires_delta (Optional[timedelta]) - Custom expiration time.
@@ -42,6 +43,7 @@ def create_access_token(data: dict, expires_delta: Optional[timedelta] = None) -
# @PURPOSE: Decodes and validates a JWT token.
# @PRE: token is a signed JWT string.
# @POST: Returns the decoded payload if valid.
# @RELATION: DEPENDS_ON -> auth_config
#
# @PARAM: token (str) - The JWT to decode.
# @RETURN: dict - The decoded payload.
@@ -52,4 +54,4 @@ def decode_token(token: str) -> dict:
return payload
# [/DEF:decode_token:Function]
# [/DEF:backend.src.core.auth.jwt:Module]
# [/DEF:AuthJwtModule:Module]