diff options
| author | Kit La Touche <kit@transneptune.net> | 2024-10-03 23:30:42 -0400 |
|---|---|---|
| committer | Kit La Touche <kit@transneptune.net> | 2024-10-03 23:30:42 -0400 |
| commit | d50b1b56c011c03c7d8a95242af404b727e91a80 (patch) | |
| tree | efe3408f6a8ef669981826d1a29d16a24b460d89 /src/login/mod.rs | |
| parent | 30c13478d61065a512f5bc8824fecbf2ee6afc81 (diff) | |
| parent | 7f12fd41c2941a55a6437f24e4f780104a718790 (diff) | |
Merge branch 'main' into feature-frontend
Diffstat (limited to 'src/login/mod.rs')
| -rw-r--r-- | src/login/mod.rs | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/src/login/mod.rs b/src/login/mod.rs index 6ae82ac..65e3ada 100644 --- a/src/login/mod.rs +++ b/src/login/mod.rs @@ -1,8 +1,21 @@ -pub use self::routes::router; - pub mod app; -pub mod broadcaster; pub mod extract; -mod repo; +mod id; +pub mod password; +pub 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. +} |
