towerops/lib/towerops_web/controllers
Graham McIntire 264154a3d8
feat: implement sudo mode MFA-only verification controller
- Add UserSudoController with GET and POST /users/sudo/verify routes
- Create verify.html.heex template for TOTP verification form
- Only accept TOTP codes (6 numeric digits), reject recovery codes
- Update grant_sudo_mode to set authenticated_at virtual field
- Exclude /users/sudo paths from return_to overwriting
- Add comprehensive controller tests (12 test cases)
- Verify redirect behavior, error handling, and session management

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-01 14:34:17 -06:00
..
api live device polling 2026-02-01 13:19:32 -06:00
api_docs_html impersonate fixes 2026-01-28 14:41:27 -06:00
error_html add error pages 2026-01-06 14:37:48 -06:00
page_html enhance user auditing 2026-01-30 17:38:07 -06:00
user_registration_html gdpr consent tracking 2026-01-29 11:12:35 -06:00
user_reset_password_html forgot password flow 2026-01-31 17:03:22 -06:00
user_session_html forgot password flow 2026-01-31 17:03:22 -06:00
user_settings_html paginate discovered devices 2026-01-31 10:31:37 -06:00
user_sudo_html feat: implement sudo mode MFA-only verification controller 2026-02-01 14:34:17 -06:00
admin_controller.ex Add superuser system with user impersonation for admin support 2026-01-06 12:50:10 -06:00
api_docs_controller.ex updates 2026-01-17 17:49:53 -06:00
api_docs_html.ex updates 2026-01-17 17:49:53 -06:00
debug_controller.ex add headers debug in prod 2026-02-01 10:54:13 -06:00
error_html.ex add error pages 2026-01-06 14:37:48 -06:00
error_json.ex init 2025-12-21 11:10:43 -06:00
health_controller.ex security fixes 2026-01-28 17:02:36 -06:00
page_controller.ex cookie improvements 2026-01-28 12:30:28 -06:00
page_html.ex init 2025-12-21 11:10:43 -06:00
user_registration_controller.ex impersonate fixes 2026-01-28 14:41:27 -06:00
user_registration_html.ex credo cleanup 2026-01-17 15:00:52 -06:00
user_reset_password_controller.ex forgot password flow 2026-01-31 17:03:22 -06:00
user_reset_password_html.ex forgot password flow 2026-01-31 17:03:22 -06:00
user_session_controller.ex fix TOTP enrollment with recovery codes 2026-01-31 14:54:44 -06:00
user_session_html.ex credo cleanup 2026-01-17 15:00:52 -06:00
user_settings_controller.ex Convert User Settings from controller to LiveView 2026-01-15 16:29:50 -06:00
user_settings_html.ex credo cleanup 2026-01-17 15:00:52 -06:00
user_sudo_controller.ex feat: implement sudo mode MFA-only verification controller 2026-02-01 14:34:17 -06:00
user_sudo_html.ex feat: implement sudo mode MFA-only verification controller 2026-02-01 14:34:17 -06:00