This chapter defines how authentication and authorization are enforced in Coyote3.
Authentication is handled through login routes in the login blueprint and Flask-Login session management.
Key elements:
Two core checks happen before business logic executes:
If either check fails, execution is redirected or blocked before domain logic runs.
Coyote3 uses layered authorization:
@require(...)UI helpers improve usability, but route decorators are the source of truth.
Injected helper functions include:
can(...)min_level(...)min_role(...)has_access(...)These should never replace backend route protection.
Selected actions are logged through audit decorators.
Route handlers can attach contextual metadata in request context (g.audit_metadata) to enrich audit trails.