Skip to main content

sova_csrf/
events.rs

1//! Domain events emitted on the app [`EventBus`](sova_core::EventBus).
2
3use sova_core::Event;
4
5/// Fired before a 403 response for CSRF mismatch or missing token.
6#[derive(Debug, Clone)]
7pub struct CsrfMismatch {
8    pub method: String,
9    pub path: String,
10}
11
12impl Event for CsrfMismatch {
13    fn name(&self) -> &'static str {
14        "csrf.mismatch"
15    }
16}