Commit Graph

4 Commits

Author SHA1 Message Date
giles
98080b10c5 Add email field to UserContext
Extract email from session cookie and JWT claims. Store email in
cookie data. Needed for coop fragment composition (auth-menu).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 22:38:48 +00:00
gilesb
11aa0568c5 Add l2_server field to UserContext
Allows L1 servers to track which L2 server the user authenticated with.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 17:35:18 +00:00
gilesb
932abb8d7a Fix auth to handle JWT tokens without actor_id
- Default actor_id to @username when not in token claims
- Support both artdag_session (base64 JSON) and auth_token (JWT) cookies
- Check both 'username' and 'sub' claims for username
- Check both 'actor_id' and 'actor' claims for actor_id

This fixes authentication when L2 tokens don't include actor_id.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 16:06:51 +00:00
giles
fd97812e3d Initial artdag-common shared library
Shared components for L1 and L2 servers:
- Jinja2 template system with base template and components
- Middleware for auth and content negotiation
- Pydantic models for requests/responses
- Utility functions for pagination, media, formatting
- Constants for Tailwind/HTMX/Cytoscape CDNs

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 07:07:59 +00:00