Dries Peeters
|
5c11010095
|
feat(oidc): add optional OIDC login via Authlib; config, routes, docs
- Add AUTH_METHOD switch (local | oidc | both); default remains local
- Update login UI to conditionally show SSO button and/or local form
- Add Authlib and initialize OAuth client (discovery-based) in app factory
- Implement OIDC Authorization Code flow with PKCE:
- GET /login/oidc → starts auth flow, preserves `next`
- GET /auth/oidc/callback → exchanges code, parses ID token, fetches userinfo
- Maps claims to username/full_name/email; admin mapping via group/email
- Logs user in and redirects to intended page
- Add optional OIDC end-session on logout (falls back gracefully if unsupported)
- Extend User model with `email`, `oidc_issuer`, `oidc_sub` and unique constraint
- Add Alembic migration 015 (adds columns, index, unique constraint)
- Update env.example with OIDC variables and AUTH_METHOD
- Add docs/OIDC_SETUP.md with provider-agnostic setup guide and examples
- fix: remove invalid walrus usage in OIDC client registration
Migration:
- Run database migrations (e.g., `flask db upgrade`) to apply revision 015
Config:
- AUTH_METHOD=local|oidc|both
- OIDC_ISSUER, OIDC_CLIENT_ID, OIDC_CLIENT_SECRET, OIDC_REDIRECT_URI
- OIDC_SCOPES (default: "openid profile email")
- OIDC_USERNAME_CLAIM, OIDC_FULL_NAME_CLAIM, OIDC_EMAIL_CLAIM, OIDC_GROUPS_CLAIM
- OIDC_ADMIN_GROUP (optional), OIDC_ADMIN_EMAILS (optional)
- OIDC_POST_LOGOUT_REDIRECT_URI (optional)
Routes:
- /login (respects AUTH_METHOD), /login/oidc, /auth/oidc/callback, /logout
Docs:
- See docs/OIDC_SETUP.md for full setup, provider notes, and troubleshooting
|
2025-10-05 11:46:20 +02:00 |
|
Dries Peeters
|
8a378b7078
|
feat(clients,license,db): add client management, enhanced DB init, and tests
- Clients: add model, routes, and templates
- app/models/client.py
- app/routes/clients.py
- templates/clients/{create,edit,list,view}.html
- docs/CLIENT_MANAGEMENT_README.md
- Database: add enhanced init/verify scripts, migrations, and docs
- docker/{init-database-enhanced.py,start-enhanced.py,verify-database.py}
- docs/ENHANCED_DATABASE_STARTUP.md
- migrations/{add_analytics_column.sql,add_analytics_setting.py,migrate_to_client_model.py}
- Scripts: add version manager and docker network test helpers
- scripts/version-manager.{bat,ps1,py,sh}
- scripts/test-docker-network.{bat,sh}
- docs/VERSION_MANAGEMENT.md
- UI: tweak base stylesheet
- app/static/base.css
- Tests: add client system test
- test_client_system.py
|
2025-09-01 11:34:45 +02:00 |
|
Dries Peeters
|
1b3a703c04
|
feat: comprehensive project cleanup and timezone enhancement
- Remove redundant documentation files (DATABASE_INIT_FIX_*.md, TIMEZONE_FIX_README.md)
- Delete unused Docker files (Dockerfile.test, Dockerfile.combined, docker-compose.yml)
- Remove obsolete deployment scripts (deploy.sh) and unused files (index.html, _config.yml)
- Clean up logs directory (remove 2MB timetracker.log, keep .gitkeep)
- Remove .pytest_cache directory
- Consolidate Docker setup to two main container types:
* Simple container (recommended for production)
* Public container (for development/testing)
- Enhance timezone support in admin settings:
* Add 100+ timezone options organized by region
* Implement real-time timezone preview with current time display
* Add timezone offset calculation and display
* Remove search functionality for cleaner interface
* Update timezone utility functions for database-driven configuration
- Update documentation:
* Revise README.md to reflect current project state
* Add comprehensive timezone features documentation
* Update Docker deployment instructions
* Create PROJECT_STRUCTURE.md for project overview
* Remove references to deleted files
- Improve project structure:
* Streamlined file organization
* Better maintainability and focus
* Preserved all essential functionality
* Cleaner deployment options
|
2025-08-28 14:52:09 +02:00 |
|