Begin new protocol refactor
parent: tbd commit: 26651b1
1 | use ; |
2 | use ; |
3 | |
4 | use crate; |
5 | |
6 | use MessageTarget; |
7 | |
8 | /// An account registration request. |
9 | /// |
10 | /// # Authentication |
11 | /// - Instance Authentication |
12 | /// - **ONLY ACCEPTED WHEN SAME-INSTANCE** |
13 | |
14 | |
15 | pub username: String, |
16 | pub email: , |
17 | pub password: , |
18 | |
19 | |
20 | |
21 | |
22 | None |
23 | |
24 | |
25 | |
26 | |
27 | |
28 | pub token: String, |
29 | |
30 | |
31 | /// An authentication token request. |
32 | /// |
33 | /// AKA Login Request |
34 | /// |
35 | /// # Authentication |
36 | /// - Instance Authentication |
37 | /// - Identifies the Instance to issue the token for |
38 | /// # Authorization |
39 | /// - Credentials ([`crate::backend::AuthBackend`]-based) |
40 | /// - Identifies the User account to issue a token for |
41 | /// - Decrypts user private key to issue to |
42 | |
43 | |
44 | pub instance: Instance, |
45 | pub username: String, |
46 | pub password: , |
47 | |
48 | |
49 | |
50 | ; |
51 | |
52 | |
53 | |
54 | self.0.zeroize |
55 | |
56 | |
57 | |
58 | |
59 | |
60 | |
61 | |
62 | |
63 | |
64 | Some |
65 | |
66 | |
67 | |
68 | |
69 | |
70 | pub token: UserAuthenticationToken, |
71 | |
72 | |
73 | /// An authentication token extension request. |
74 | /// |
75 | /// # Authentication |
76 | /// - Instance Authentication |
77 | /// - Identifies the Instance to issue the token for |
78 | /// - User Authentication |
79 | /// - Authenticates the validity of the token |
80 | /// # Authorization |
81 | /// - Token-based |
82 | /// - Validates authorization using token's authenticity |
83 | |
84 | |
85 | pub token: UserAuthenticationToken, |
86 | |
87 | |
88 | |
89 | |
90 | // todo! |
91 | None |
92 | |
93 | |
94 | |
95 | |
96 | |
97 | pub new_token: , |
98 | |
99 |