Authentication Model
The Artifact Miner API currently uses session-based authentication rather than token-based authentication. User identity is established through configuration questions rather than traditional login.How It Works
1. User Configuration
When you first use Artifact Miner, you answer configuration questions including your email address:POST /answers
2. Identity Association
Your email address is stored in the database and used to:- Filter git commits to your contributions
- Associate generated content with your account
- Scope portfolio and resume data to your identity
3. No API Keys Required
There is no need for API keys or bearer tokens. All requests are processed within your local session.Session Scope
The API maintains session state through:- User answers - Configuration stored in
UserAnswertable - Consent level - Privacy preferences in
Consenttable - Portfolio ID - UUID linking uploaded ZIPs to portfolios
Multi-User Considerations
The current implementation is designed for single-user local usage. If you need to support multiple users:- Each user should run their own instance of the API
- Or implement additional session management on top of the base API
Data Privacy
Since authentication is session-based and local:- No credentials are sent over the network
- All data remains on your machine
- You control consent for LLM usage via the
/consentendpoint
Future Authentication
If deploying Artifact Miner in a multi-user environment, you may want to add:- JWT token-based authentication
- OAuth integration
- API key management
- User registration and login flows
Related Endpoints
- GET /questions - Retrieve configuration questions
- POST /answers - Submit user configuration
- GET /consent - Check consent level
- PUT /consent - Update consent level
Example: Complete Setup Flow
Security Notes
- The API listens on
127.0.0.1(localhost) by default - No authentication means anyone with access to your machine can use the API
- For production deployments, implement proper authentication and HTTPS