1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
//! Domain events emitted on the app [`EventBus`](sova_core::EventBus). use sova_core::Event; /// Fired when [`crate::Session::regenerate`] issues a new session id. #[derive(Debug, Clone)] pub struct SessionRegenerated { pub had_user: bool, } impl Event for SessionRegenerated { fn name(&self) -> &'static str { "session.regenerated" } } /// Fired after [`crate::SessionExt::logout_all_sessions`] destroys sessions. #[derive(Debug, Clone)] pub struct SessionLogoutAll { pub user_id: String, pub count: u64, } impl Event for SessionLogoutAll { fn name(&self) -> &'static str { "session.logout_all" } }