nostr_types/client/
auth.rs

1use crate::Id;
2
3/// The state of authentication to the relay
4#[derive(Debug, Clone, Default, PartialEq, Eq)]
5pub enum AuthState {
6    /// AUTH has not been requested by the relay
7    #[default]
8    NotYetRequested,
9
10    /// AUTH has been requested
11    Challenged(String),
12
13    /// AUTH is in progress, we have sent the event
14    InProgress(Id),
15
16    /// AUTH succeeded
17    Success,
18
19    /// AUTH failed
20    Failure(String),
21}