ic_auth_protocol_types/logout.rs
1//! Caller-authenticated logout transport; no proof or target identity is accepted.
2use serde::{Deserialize, Serialize};
3
4/// Acknowledges only this destination's committed revocation, never global logout.
5#[derive(Clone, Copy, Debug, Deserialize, Serialize, Eq, PartialEq)]
6pub enum LogoutResult {
7 /// Committed denial through this known login's authenticated deadline.
8 Revoked {
9 /// Exclusive end of the committed local denial, in nanoseconds.
10 deny_until_ns: u64,
11 },
12 /// Local denial committed without an authenticated login lifetime. This is
13 /// not confirmation that every outstanding credential is revoked.
14 Unconfirmed {
15 /// Exclusive local denial deadline, not proof of the login's true lifetime.
16 deny_until_ns: u64,
17 },
18 /// The authenticated ingress caller is not admissible for logout.
19 InvalidCaller,
20 /// No successful revocation can be acknowledged for this attempt.
21 Unavailable(LogoutUnavailable),
22}
23
24/// No successful revocation is implied; transport failures also remain unknown.
25#[derive(Clone, Copy, Debug, Deserialize, Serialize, Eq, PartialEq)]
26pub enum LogoutUnavailable {
27 /// The bounded revocation store cannot retain the required denial.
28 Capacity,
29 /// The backing store could not commit or read the required state.
30 Storage,
31 /// Trusted time is unavailable or violates the store's clock fence.
32 Clock,
33 /// A protected reset must complete before logout can be acknowledged.
34 ResetPending,
35}