diff options
Diffstat (limited to 'src/reclaim/oidc_helper.c')
-rw-r--r-- | src/reclaim/oidc_helper.c | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/src/reclaim/oidc_helper.c b/src/reclaim/oidc_helper.c index 041a2fe47..84a90833c 100644 --- a/src/reclaim/oidc_helper.c +++ b/src/reclaim/oidc_helper.c | |||
@@ -193,6 +193,7 @@ generate_userinfo_json (const struct GNUNET_IDENTITY_PublicKey *sub_key, | |||
193 | json_object_set_new (body, "iss", json_string (SERVER_ADDRESS)); | 193 | json_object_set_new (body, "iss", json_string (SERVER_ADDRESS)); |
194 | // sub REQUIRED public key identity, not exceed 255 ASCII length | 194 | // sub REQUIRED public key identity, not exceed 255 ASCII length |
195 | json_object_set_new (body, "sub", json_string (subject)); | 195 | json_object_set_new (body, "sub", json_string (subject)); |
196 | GNUNET_free (subject); | ||
196 | pres_val_str = NULL; | 197 | pres_val_str = NULL; |
197 | source_name = NULL; | 198 | source_name = NULL; |
198 | int i = 0; | 199 | int i = 0; |
@@ -202,14 +203,14 @@ generate_userinfo_json (const struct GNUNET_IDENTITY_PublicKey *sub_key, | |||
202 | GNUNET_asprintf (&source_name, | 203 | GNUNET_asprintf (&source_name, |
203 | "src%d", | 204 | "src%d", |
204 | i); | 205 | i); |
205 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 206 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
206 | "Adding new presentation source #%d\n", i); | 207 | "Adding new presentation source #%d\n", i); |
207 | aggr_sources_jwt = json_object (); | 208 | aggr_sources_jwt = json_object (); |
208 | pres_val_str = | 209 | pres_val_str = |
209 | GNUNET_RECLAIM_presentation_value_to_string (ple->presentation->type, | 210 | GNUNET_RECLAIM_presentation_value_to_string (ple->presentation->type, |
210 | ple->presentation->data, | 211 | ple->presentation->data, |
211 | ple->presentation->data_size); | 212 | ple->presentation->data_size); |
212 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 213 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
213 | "Presentation is: %s\n", pres_val_str); | 214 | "Presentation is: %s\n", pres_val_str); |
214 | json_object_set_new (aggr_sources_jwt, | 215 | json_object_set_new (aggr_sources_jwt, |
215 | GNUNET_RECLAIM_presentation_number_to_typename ( | 216 | GNUNET_RECLAIM_presentation_number_to_typename ( |
@@ -224,7 +225,9 @@ generate_userinfo_json (const struct GNUNET_IDENTITY_PublicKey *sub_key, | |||
224 | 225 | ||
225 | for (le = attrs->list_head; NULL != le; le = le->next) | 226 | for (le = attrs->list_head; NULL != le; le = le->next) |
226 | { | 227 | { |
227 | 228 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | |
229 | "Processing %s for userinfo body\n", | ||
230 | le->attribute->name); | ||
228 | if (GNUNET_YES == GNUNET_RECLAIM_id_is_zero (&le->attribute->credential)) | 231 | if (GNUNET_YES == GNUNET_RECLAIM_id_is_zero (&le->attribute->credential)) |
229 | { | 232 | { |
230 | 233 | ||
@@ -260,18 +263,6 @@ generate_userinfo_json (const struct GNUNET_IDENTITY_PublicKey *sub_key, | |||
260 | int j = 0; | 263 | int j = 0; |
261 | for (ple = presentations->list_head; NULL != ple; ple = ple->next) | 264 | for (ple = presentations->list_head; NULL != ple; ple = ple->next) |
262 | { | 265 | { |
263 | char *tmp; | ||
264 | tmp = GNUNET_STRINGS_data_to_string_alloc (&le->attribute->credential, | ||
265 | sizeof (le->attribute->credential)); | ||
266 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | ||
267 | "Checking : %s\n", tmp); | ||
268 | GNUNET_free (tmp); | ||
269 | |||
270 | tmp = GNUNET_STRINGS_data_to_string_alloc (&ple->presentation->credential_id, | ||
271 | sizeof (ple->presentation->credential_id)); | ||
272 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | ||
273 | " against: %s\n", tmp); | ||
274 | GNUNET_free (tmp); | ||
275 | if (GNUNET_YES == | 266 | if (GNUNET_YES == |
276 | GNUNET_RECLAIM_id_is_equal (&ple->presentation->credential_id, | 267 | GNUNET_RECLAIM_id_is_equal (&ple->presentation->credential_id, |
277 | &le->attribute->credential)) | 268 | &le->attribute->credential)) |
@@ -289,7 +280,7 @@ generate_userinfo_json (const struct GNUNET_IDENTITY_PublicKey *sub_key, | |||
289 | GNUNET_asprintf (&source_name, | 280 | GNUNET_asprintf (&source_name, |
290 | "src%d", | 281 | "src%d", |
291 | j); | 282 | j); |
292 | json_object_set_new (aggr_names, le->attribute->data, | 283 | json_object_set_new (aggr_names, le->attribute->name, |
293 | json_string (source_name)); | 284 | json_string (source_name)); |
294 | GNUNET_free (source_name); | 285 | GNUNET_free (source_name); |
295 | } | 286 | } |