Fixes
parent: tbd commit: 25c3410
1 | use type_name; |
2 | |
3 | use |
4 | , | DecodeRsaPrivateKey
5 | , | SigningKey
6 | , | Sha256
7 | , |
8 | RsaPrivateKey, |
9 | ; |
10 | use ; |
11 | use info; |
12 | |
13 | use ; |
14 | |
15 | |
16 | |
17 | pub user: User, |
18 | pub generated_for: Instance, |
19 | pub exp: u64, |
20 | |
21 | |
22 | |
23 | |
24 | pub target_instance: , |
25 | pub source: , |
26 | pub message_type: String, |
27 | #[serde(flatten)] |
28 | pub message: T, |
29 | |
30 | |
31 | |
32 | ; |
33 | |
34 | |
35 | |
36 | ; |
37 | |
38 | |
39 | |
40 | |
41 | A: AuthenticationSourceProvider, |
42 | |
43 | |
44 | vec! |
45 | |
46 | |
47 | |
48 | |
49 | |
50 | A: AuthenticationSourceProvider, |
51 | B: AuthenticationSourceProvider, |
52 | |
53 | |
54 | let = self; |
55 | |
56 | vec! |
57 | |
58 | |
59 | |
60 | |
61 | |
62 | let message_payload = to_vec .unwrap; |
63 | |
64 | let authentication = auth_sources.authenticate_all; |
65 | |
66 | Self |
67 | source: authentication, |
68 | message_type: .to_string, |
69 | message, |
70 | target_instance: None, |
71 | |
72 | |
73 | |
74 | |
75 | instance: impl , |
76 | message: T, |
77 | auth_sources: impl AuthenticationSourceProvider, |
78 | |
79 | let message_payload = to_vec .unwrap; |
80 | |
81 | info! |
82 | "Verifying payload: {}", |
83 | unwrap | from_utf8 .
84 | ; |
85 | |
86 | let authentication = auth_sources.authenticate_all; |
87 | |
88 | Self |
89 | source: authentication, |
90 | message_type: .to_string, |
91 | message, |
92 | target_instance: Some, |
93 | |
94 | |
95 | |
96 | |
97 | Self |
98 | source: vec!, |
99 | message_type: .to_string, |
100 | message, |
101 | target_instance: None, |
102 | |
103 | |
104 | |
105 | |
106 | let message_payload = to_vec .unwrap; |
107 | |
108 | info! |
109 | "Verifying payload: {}", |
110 | unwrap | from_utf8 .
111 | ; |
112 | |
113 | self.source |
114 | .push; |
115 | |
116 | |
117 | |
118 | |
119 | |
120 | |
121 | |
122 | pub user: User, |
123 | pub token: UserAuthenticationToken, |
124 | |
125 | |
126 | |
127 | |
128 | User |
129 | user: self.user, |
130 | token: self.token, |
131 | |
132 | |
133 | |
134 | |
135 | |
136 | |
137 | pub instance: Instance, |
138 | pub private_key: &'a str, |
139 | |
140 | |
141 | |
142 | |
143 | let mut rng = thread_rng; |
144 | |
145 | let private_key = from_pkcs1_pem .unwrap; |
146 | let signing_key = new; |
147 | let signature = signing_key.sign_with_rng; |
148 | |
149 | Instance |
150 | instance: self.instance, |
151 | // TODO: Actually parse signature from private key |
152 | signature: InstanceSignature, |
153 | |
154 | |
155 | |
156 | |
157 | |
158 | |
159 | ; |
160 | |
161 | |
162 | |
163 | Self |
164 | |
165 | |
166 | |
167 | |
168 | |
169 | self.0.clone |
170 | |
171 | |
172 | |
173 | |
174 | |
175 | &self.0 |
176 | |
177 | |
178 | |
179 | |
180 | ; |
181 | |
182 | |
183 | |
184 | &self.0 |
185 | |
186 | |
187 | |
188 | |
189 | |
190 | User |
191 | user: User, |
192 | token: UserAuthenticationToken, |
193 | , |
194 | Instance |
195 | instance: Instance, |
196 | signature: InstanceSignature, |
197 | , |
198 | |
199 |