diff options
Diffstat (limited to 'src/state/mod.rs')
| -rw-r--r-- | src/state/mod.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/state/mod.rs b/src/state/mod.rs index 26910b6..a2da643 100644 --- a/src/state/mod.rs +++ b/src/state/mod.rs @@ -156,6 +156,11 @@ pub(crate) struct AppState { pub(crate) screening: Arc<std::sync::Mutex<crate::access::screen::Screening>>, /// The challenges logins by key used, until they expire (`access::challenge`). pub(crate) challenges: Arc<std::sync::Mutex<crate::access::challenge::Used>>, + /// Sessions ended on this node in a swarm without a registry, where they can't be + /// recorded in the document: by session ID, until when each would have lasted + /// (`api::login::end_session`). This node refuses their tokens; others take them + /// until they expire, and so does this one after a restart. + pub(crate) ended_sessions: Arc<std::sync::Mutex<std::collections::BTreeMap<String, u64>>>, pub(crate) token_lifetime: Duration, pub(crate) session_lifetime: Duration, /// How long a challenge to log in by key is valid, and how many logins by key a user |
