Add docs
parent: tbd commit: 51aad53
1 | use ; |
2 | |
3 | use InstanceAuthenticated; |
4 | |
5 | /// An authentication message. |
6 | /// |
7 | /// View request documentation, authentication, and authorization |
8 | /// details in the associated type, [`AuthenticationRequest`]. |
9 | |
10 | |
11 | Request, |
12 | Response, |
13 | |
14 | |
15 | |
16 | |
17 | /// An account registration request. |
18 | /// |
19 | /// # Authentication |
20 | /// - Instance Authentication |
21 | /// - **ONLY ACCEPTED WHEN SAME-INSTANCE** |
22 | RegisterAccount, |
23 | |
24 | /// An authentication token request. |
25 | /// |
26 | /// AKA Login Request |
27 | /// |
28 | /// # Authentication |
29 | /// - Instance Authentication |
30 | /// - **ONLY ACCEPTED WHEN SAME-INSTANCE** |
31 | /// - Identifies the Instance to issue the token for |
32 | /// # Authorization |
33 | /// - Credentials ([`crate::backend::AuthBackend`]-based) |
34 | /// - Identifies the User account to issue a token for |
35 | /// - Decrypts user private key to issue to |
36 | AuthenticationToken, |
37 | |
38 | /// An authentication token extension request. |
39 | /// |
40 | /// # Authentication |
41 | /// - Instance Authentication |
42 | /// - **ONLY ACCEPTED WHEN SAME-INSTANCE** |
43 | /// - Identifies the Instance to issue the token for |
44 | /// # Authorization |
45 | /// - Token-based |
46 | /// - Validates authorization using token's authenticity |
47 | TokenExtension, |
48 | |
49 | |
50 | |
51 | |
52 | RegisterAccount, |
53 | AuthenticationToken, |
54 | TokenExtension, |
55 | |
56 | |
57 | /// See [`AuthenticationRequest::RegisterAccount`]'s documentation. |
58 | |
59 | |
60 | pub username: String, |
61 | pub email: , |
62 | pub password: String, |
63 | |
64 | |
65 | |
66 | |
67 | pub token: String, |
68 | |
69 | |
70 | /// See [`AuthenticationRequest::AuthenticationToken`]'s documentation. |
71 | |
72 | |
73 | pub secret_key: String, |
74 | pub username: String, |
75 | pub password: String, |
76 | |
77 | |
78 | |
79 | |
80 | pub token: String, |
81 | |
82 | |
83 | /// See [`AuthenticationRequest::TokenExtension`]'s documentation. |
84 | |
85 | |
86 | pub secret_key: String, |
87 | pub token: String, |
88 | |
89 | |
90 | |
91 | |
92 | pub new_token: , |
93 | |
94 |