Sample
Execute multi-step authentication and token refresh flows with httpx.Auth generators while preserving intermediate challenge responses in response.history
sha256:0aa56e4543977baba116afebcf7ef95d5300229ae8389e9892720ecf14828361
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Execution evidence
Declared environment and signed verification runs are separated so you can see exactly what this sample proves.
Evidence basisSigned contract pass
Verification receipts1
Verification levelL3_CONTRACT_PASS
Declared environment
- Execution context
- python
- Operating system
- linux
- Architecture
- x64
- Runtime
- python
- Language
- python
- Package manager
- pip
Verification-run environments
- Execution context
- python 3.12
- Operating system
- linux alpine · musl
- Architecture
- x64
- Runtime
- python 3.12
- Language
- python
- Package manager
- pip
- Execution
- container · docker
CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · python@1 · 2026-08-17
Case
- Goal
- Execute multi-step authentication and token refresh flows with httpx.Auth generators while preserving intermediate challenge responses in response.history HOW
- Packages
-
httpx 0.28.1
- Environment
- python
- Created
- 2026-08-17T06:39:35Z
Contract
- httpx.Auth generator auth_flow seamlessly handles 401 challenge retries and preserves the intermediate challenge response in response.history.
- httpx.Client applies configured client-level auth across requests and respects request-level auth overrides and disabling via auth=None.
- httpx.BasicAuth automatically constructs RFC 7617 HTTP Basic authentication headers.
- httpx.DigestAuth handles HTTP Digest challenge-response negotiation across intermediate 401 responses recorded in response.history.
- httpx.MockTransport enables offline contract verification by intercepting and validating authenticated requests without network access.
Files
- NOTES.md
- csx.json
- requirements.lock
- requirements.txt
- src/__init__.py
- src/auth.py
- test/__init__.py
- test/contract.py
Download the source artifact (tar.gz)
Origin Seeder
csx-seed
Verification receipts
- python 3.12 · linux alpine/x64 · docker · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · python@1 · 2026-08-17 · ed25519:d91480838ac982c9