aboutsummaryrefslogtreecommitdiff
path: root/src/reclaim/oidc_helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/reclaim/oidc_helper.c')
-rw-r--r--src/reclaim/oidc_helper.c23
1 files changed, 9 insertions, 14 deletions
diff --git a/src/reclaim/oidc_helper.c b/src/reclaim/oidc_helper.c
index a90d02d68..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,11 +203,15 @@ 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);
206 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
207 "Adding new presentation source #%d\n", i);
205 aggr_sources_jwt = json_object (); 208 aggr_sources_jwt = json_object ();
206 pres_val_str = 209 pres_val_str =
207 GNUNET_RECLAIM_presentation_value_to_string (ple->presentation->type, 210 GNUNET_RECLAIM_presentation_value_to_string (ple->presentation->type,
208 ple->presentation->data, 211 ple->presentation->data,
209 ple->presentation->data_size); 212 ple->presentation->data_size);
213 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
214 "Presentation is: %s\n", pres_val_str);
210 json_object_set_new (aggr_sources_jwt, 215 json_object_set_new (aggr_sources_jwt,
211 GNUNET_RECLAIM_presentation_number_to_typename ( 216 GNUNET_RECLAIM_presentation_number_to_typename (
212 ple->presentation->type), 217 ple->presentation->type),
@@ -220,7 +225,9 @@ generate_userinfo_json (const struct GNUNET_IDENTITY_PublicKey *sub_key,
220 225
221 for (le = attrs->list_head; NULL != le; le = le->next) 226 for (le = attrs->list_head; NULL != le; le = le->next)
222 { 227 {
223 228 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
229 "Processing %s for userinfo body\n",
230 le->attribute->name);
224 if (GNUNET_YES == GNUNET_RECLAIM_id_is_zero (&le->attribute->credential)) 231 if (GNUNET_YES == GNUNET_RECLAIM_id_is_zero (&le->attribute->credential))
225 { 232 {
226 233
@@ -256,18 +263,6 @@ generate_userinfo_json (const struct GNUNET_IDENTITY_PublicKey *sub_key,
256 int j = 0; 263 int j = 0;
257 for (ple = presentations->list_head; NULL != ple; ple = ple->next) 264 for (ple = presentations->list_head; NULL != ple; ple = ple->next)
258 { 265 {
259 char *tmp;
260 tmp = GNUNET_STRINGS_data_to_string_alloc (&le->attribute->credential,
261 sizeof (le->attribute->credential));
262 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
263 "Checking : %s\n", tmp);
264 GNUNET_free (tmp);
265
266 tmp = GNUNET_STRINGS_data_to_string_alloc (&ple->presentation->credential_id,
267 sizeof (ple->presentation->credential_id));
268 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
269 " against: %s\n", tmp);
270 GNUNET_free (tmp);
271 if (GNUNET_YES == 266 if (GNUNET_YES ==
272 GNUNET_RECLAIM_id_is_equal (&ple->presentation->credential_id, 267 GNUNET_RECLAIM_id_is_equal (&ple->presentation->credential_id,
273 &le->attribute->credential)) 268 &le->attribute->credential))
@@ -285,7 +280,7 @@ generate_userinfo_json (const struct GNUNET_IDENTITY_PublicKey *sub_key,
285 GNUNET_asprintf (&source_name, 280 GNUNET_asprintf (&source_name,
286 "src%d", 281 "src%d",
287 j); 282 j);
288 json_object_set_new (aggr_names, le->attribute->data, 283 json_object_set_new (aggr_names, le->attribute->name,
289 json_string (source_name)); 284 json_string (source_name));
290 GNUNET_free (source_name); 285 GNUNET_free (source_name);
291 } 286 }