← Back to Documentation
Reference Implementation
Production-ready Authorization Server and Resource Server implementations demonstrating all AAP features.
1,500+
Lines of Python
100%
Spec Coverage
2-3ms
Token Validation
Authorization Server
~800 LOCFeatures
- Client Credentials Grant (RFC 6749)
- Token Exchange (RFC 8693) with privilege reduction
- Policy-based capability evaluation
- ES256/RS256 token signing
- Delegation depth tracking
- Oversight requirements configuration
Resource Server
~700 LOCFeatures
- Complete 7-step validation pipeline
- JWT signature verification
- Constraint enforcement (rate limits, domains, time windows)
- Capability matching with ABNF validation
- Privacy-preserving error messages
- Example protected endpoints
Quick Start
1. Install Dependencies
cd reference-impl
pip install -r requirements.txt2. Generate Keys
bash scripts/generate_keys.sh3. Start Authorization Server
cd as
python server.py4. Start Resource Server
cd rs
python server.py5. Request Token
curl -X POST http://localhost:8080/token \
-d grant_type=client_credentials \
-d client_id=agent-researcher-01 \
-d client_secret=secret \
-d operator=org:acme-corp \
-d capabilities=search.webDownload Implementation
Get the complete reference implementation including AS, RS, policies, and documentation.
View on GitHub →