summaryrefslogtreecommitdiff
path: root/src/login/mod.rs
blob: 91c1821d2a2c046c916ce6b5397c606ff7c9ef2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
pub mod app;
pub mod broadcaster;
pub mod extract;
mod id;
pub mod password;
mod repo;
mod routes;
pub mod types;

pub use self::{id::Id, password::Password, routes::router};

// This also implements FromRequestParts (see `./extract.rs`). As a result, it
// can be used as an extractor for endpoints that want to require login, or for
// endpoints that need to behave differently depending on whether the client is
// or is not logged in.
#[derive(Clone, Debug, Eq, PartialEq, serde::Serialize)]
pub struct Login {
    pub id: Id,
    pub name: String,
    // The omission of the hashed password is deliberate, to minimize the
    // chance that it ends up tangled up in debug output or in some other chunk
    // of logic elsewhere.
}