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