Buckets:
AnonymousSpottedToad/candidate_bucket / preliminary /mappings /python /verifiable_token_based_authentication /spawn-guy_fastapi-auth0.json
| { | |
| "role_mappings": [ | |
| { | |
| "role": "Subject", | |
| "status": "missing", | |
| "symbol": "", | |
| "file": "", | |
| "lines": "", | |
| "notes": "No in-repo client sends the bearer token; callers (and FastAPI's generated Swagger UI via implicit_scheme, src/fastapi_auth0/auth.py:96) are outside the repo. tests/test_auth.py is a test and does not count." | |
| }, | |
| { | |
| "role": "Enforcer", | |
| "status": "present", | |
| "symbol": "get_user", | |
| "file": "src/fastapi_auth0/auth.py", | |
| "lines": "108", | |
| "notes": "Auth0.get_user is the FastAPI dependency installed on routes via Security(auth.get_user) (example.py:21, :25, :29); it extracts the Bearer credential through Auth0HTTPBearer (auth.py:110) and raises 401/403 on failure, else returns the Auth0User. Decision logic is inline, so it is also the Verifier." | |
| }, | |
| { | |
| "role": "Verifier", | |
| "status": "present", | |
| "symbol": "get_user", | |
| "file": "src/fastapi_auth0/auth.py", | |
| "lines": "108", | |
| "notes": "Same method as the Enforcer (no smaller helper): get_user checks the kid header, selects the JWKS key (auth.py:142-152), calls jose jwt.decode with RS256/audience/issuer (auth.py:154), maps expiry/claims errors to rejections, checks scopes and builds the Auth0User principal (auth.py:219)." | |
| }, | |
| { | |
| "role": "Key manager", | |
| "status": "present", | |
| "symbol": "__init__", | |
| "file": "src/fastapi_auth0/auth.py", | |
| "lines": "78", | |
| "notes": "Reached from get_user, which reads self.jwks (auth.py:143). Auth0.__init__ fetches the tenant's public keys from https://{domain}/.well-known/jwks.json with urllib (auth.py:91-92) and stores them; the kid-matching selection of the RSA key happens inline in get_user (auth.py:142-152). Keys originate at the Auth0 IdP and are not rotated/refreshed after startup." | |
| }, | |
| { | |
| "role": "Cryptographer", | |
| "status": "external", | |
| "symbol": "decode", | |
| "file": "src/fastapi_auth0/auth.py", | |
| "lines": "154", | |
| "notes": "Called by the Verifier get_user (auth.py:154): python-jose jwt.decode (imported auth.py:8) verifies the RS256 signature with the selected JWKS key and validates exp/aud/iss claims." | |
| }, | |
| { | |
| "role": "System", | |
| "status": "present", | |
| "symbol": "get_secure", | |
| "file": "example.py", | |
| "lines": "21", | |
| "notes": "Library repo; the in-repo example app wires the same enforcer: get_secure (example.py:21) runs only after Security(auth.get_user) returns the principal and replies with the user. Sibling handlers get_secure_scoped (example.py:25) and get_secure_scoped2 (example.py:29) are guarded the same way with scope checks." | |
| } | |
| ] | |
| } | |
Xet Storage Details
- Size:
- 2.69 kB
- Xet hash:
- 9507e664560e436acf77ec1def40eb1f100a09a275404bf71321acfc3fd879b6
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.