hezarfen_backend
Clone
https://git.tahinli.com/archive/hezarfen_backend.git
0 watching0 forksRust8.3 MiB6d68754Ahmet Kaan Gümüş2 months ago566 commits
| 1 | //! The deployment operator's account, in the control database. |
| 2 | //! |
| 3 | //! A builder creates, suspends and drops schools; it is **not** a user of any |
| 4 | //! school and holds no role there. The two principals are kept apart by |
| 5 | //! construction: a builder row lives in a different database and its cookie |
| 6 | //! carries a different prefix (`builder.<token>` against `<uuid>.<token>`), so |
| 7 | //! neither extractor can be fed the other's cookie. |
| 8 | //! |
| 9 | //! The credential newtypes are [`crate::domain::user`]'s — same rules, same |
| 10 | //! argon2 discipline, deliberately not a second copy that could drift. |
| 11 | |
| 12 | use Uuid; |
| 13 | |
| 14 | use cratenext_uuid; |
| 15 | use crateSessionToken; |
| 16 | use crateTimestamp; |
| 17 | use crate; |
| 18 | |
| 19 | pub const BUILDER_TABLE: &str = "builder"; |
| 20 | pub const BUILDER_SESSION_TABLE: &str = "builder_session"; |
| 21 | |
| 22 | |
| 23 | |
| 24 | ; |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | |
| 34 | |
| 35 | |
| 36 | |
| 37 | |
| 38 | |
| 39 | |
| 40 | |
| 41 | |
| 42 | |
| 43 | |
| 44 | |
| 45 | |
| 46 | |
| 47 | |
| 48 | |
| 49 | |
| 50 | |
| 51 | |
| 52 | |
| 53 | |
| 54 | |
| 55 | |
| 56 | |
| 57 | |
| 58 | |
| 59 | |
| 60 | |
| 61 | |
| 62 | |
| 63 | |
| 64 | |
| 65 | |
| 66 | |
| 67 | |
| 68 | |
| 69 | |
| 70 | |
| 71 | /// A builder's login session. [`crate::domain::session::Session`]'s shape |
| 72 | /// against the control database, with the token type shared so both cookies |
| 73 | /// are the same 64 hex chars. |
| 74 | |
| 75 | |
| 76 | |
| 77 | |
| 78 | |
| 79 | |
| 80 | |
| 81 | |
| 82 | |
| 83 | |
| 84 | |
| 85 | |
| 86 | |
| 87 | |
| 88 | |
| 89 | |
| 90 | |
| 91 | |
| 92 | |
| 93 |