Coverage for src/lexigram/auth/cli/doctor.py: 0%

8 statements  

« prev     ^ index     » next       coverage.py v7.15.4, created at 2026-08-25 12:26 +0800

1"""CLI doctor checks for lexigram-auth.""" 

2 

3from __future__ import annotations 

4 

5import os 

6 

7 

8def check_jwt_secret() -> dict[str, object]: 

9 """Check JWT_SECRET env var or auth.jwt.secret config. 

10 

11 Returns: 

12 A DoctorCheckResult-compatible dict. 

13 """ 

14 if os.getenv("JWT_SECRET") or os.getenv("AUTH_JWT_SECRET"): 

15 return {"status": "ok", "message": "JWT secret is configured"} 

16 return {"status": "error", "message": "JWT_SECRET environment variable not set"} 

17 

18 

19def check_auth_config() -> dict[str, object]: 

20 """Validate auth section in application.yaml. 

21 

22 Returns: 

23 A DoctorCheckResult-compatible dict. 

24 """ 

25 return {"status": "ok", "message": "Auth configuration check not yet implemented"}