Buckets:

AnonymousSpottedToad/candidate_bucket / preliminary /mappings /python /authentication_pwd /AngelDanielSanchezCastillo_oauth2fast-fastapi.json
download
raw
3.7 kB
{
"role_mappings": [
{
"role": "Subject",
"status": "missing",
"symbol": "",
"file": "",
"lines": "",
"notes": "No in-repo client posts credentials to POST /auth/token (src/oauth2fast_fastapi/routers/base_router.py:55); examples only print the endpoint and tests are excluded. The caller is outside the repo."
},
{
"role": "Enforcer",
"status": "present",
"symbol": "login",
"file": "src/oauth2fast_fastapi/routers/base_router.py",
"lines": "55",
"notes": "Route handler for POST {prefix}/token (registered via @router.post at base_router.py:47) receives username/password through OAuth2PasswordRequestForm and returns 401 when the user is unknown or verify_password fails (line 77), else issues a token. It also acts as Verification manager (inline collection of inputs)."
},
{
"role": "Verification manager",
"status": "present",
"symbol": "login",
"file": "src/oauth2fast_fastapi/routers/base_router.py",
"lines": "55",
"notes": "Same method as the Enforcer: login fetches the User by email (base_router.py:73) and passes form password plus stored hash to verify_password (base_router.py:77). verify_password (utils/password_utils.py:22) is only a thin wrapper forwarding to passlib."
},
{
"role": "Password store",
"status": "present",
"symbol": "User",
"file": "src/oauth2fast_fastapi/models/user_model.py",
"lines": "8",
"notes": "Reached from login's inline query select(User).where(User.email == form_data.username) at base_router.py:73 (no repo DAO method). The SQLModel table User stores the argon2 hash in field password (user_model.py:13)."
},
{
"role": "Hasher",
"status": "external",
"symbol": "verify",
"file": "src/oauth2fast_fastapi/utils/password_utils.py",
"lines": "33",
"notes": "login -> verify_password (base_router.py:77) -> passlib CryptContext.verify at password_utils.py:33, which re-hashes the candidate with argon2 using the salt from the stored hash. CryptContext(schemes=[\"argon2\"]) configured at password_utils.py:6; one call covers Hasher and Comparator."
},
{
"role": "Pepper store",
"status": "missing",
"symbol": "",
"file": "",
"lines": "",
"notes": "No pepper on the verification path: verify_password (password_utils.py:22) passes only password and stored hash to passlib; settings.secret_key (settings.py:19) is the JWT signing key, not a pepper."
},
{
"role": "Encrypter",
"status": "missing",
"symbol": "",
"file": "",
"lines": "",
"notes": "No encryption of the password hash anywhere in password_utils.py or login (base_router.py:55); only argon2 hashing via passlib."
},
{
"role": "Comparator",
"status": "external",
"symbol": "verify",
"file": "src/oauth2fast_fastapi/utils/password_utils.py",
"lines": "33",
"notes": "Same call as the Hasher: passlib CryptContext.verify (argon2 handler) at password_utils.py:33 compares the recomputed hash with the stored one, reached from login via verify_password at base_router.py:77; login rejects with 401 on False."
},
{
"role": "System",
"status": "present",
"symbol": "create_access_token",
"file": "src/oauth2fast_fastapi/utils/token_utils.py",
"lines": "8",
"notes": "After successful verification (and email-verified check) login calls create_access_token at base_router.py:121, which signs a JWT with python-jose; this is the login success action. Repo is a library, so no further business handler."
}
]
}

Xet Storage Details

Size:
3.7 kB
·
Xet hash:
3a5a0ac177544c996834c701ec4f48a1b5a657146ad0dc438d4920390d9fff92

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.