aboutsummaryrefslogtreecommitdiff
path: root/src/kyclogic/plugin_kyclogic_oauth2.c
diff options
context:
space:
mode:
authorÖzgür Kesim <oec-taler@kesim.org>2023-06-05 09:18:35 +0200
committerÖzgür Kesim <oec-taler@kesim.org>2023-06-05 09:18:35 +0200
commit98b51edf496cdc14974690c9809f665f14858977 (patch)
treeeb48f666852c8df8b940d001bc0b0ef644df4a55 /src/kyclogic/plugin_kyclogic_oauth2.c
parentfb5bc18c588832747dfe299f9df1beb6645cf686 (diff)
parent8cc1edfe0aa77d3091f19aa87d06bb45c74b0128 (diff)
Merge branch 'master' into age-withdraw
Diffstat (limited to 'src/kyclogic/plugin_kyclogic_oauth2.c')
-rw-r--r--src/kyclogic/plugin_kyclogic_oauth2.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/kyclogic/plugin_kyclogic_oauth2.c b/src/kyclogic/plugin_kyclogic_oauth2.c
index e7350f01..c9e5d8dc 100644
--- a/src/kyclogic/plugin_kyclogic_oauth2.c
+++ b/src/kyclogic/plugin_kyclogic_oauth2.c
@@ -951,12 +951,12 @@ parse_proof_success_reply (struct TALER_KYCLOGIC_ProofHandle *ph,
const json_t *j)
{
const char *state;
- json_t *data;
+ const json_t *data;
struct GNUNET_JSON_Specification spec[] = {
GNUNET_JSON_spec_string ("status",
&state),
- GNUNET_JSON_spec_json ("data",
- &data),
+ GNUNET_JSON_spec_object_const ("data",
+ &data),
GNUNET_JSON_spec_end ()
};
enum GNUNET_GenericReturnValue res;
@@ -988,7 +988,6 @@ parse_proof_success_reply (struct TALER_KYCLOGIC_ProofHandle *ph,
GNUNET_break_op (0);
handle_proof_error (ph,
j);
- GNUNET_JSON_parse_free (spec);
return;
}
{
@@ -1016,7 +1015,6 @@ parse_proof_success_reply (struct TALER_KYCLOGIC_ProofHandle *ph,
"Unexpected response from KYC gateway: data must contain id");
ph->http_status
= MHD_HTTP_BAD_GATEWAY;
- GNUNET_JSON_parse_free (spec);
return;
}
ph->status = TALER_KYCLOGIC_STATUS_SUCCESS;
@@ -1034,7 +1032,6 @@ parse_proof_success_reply (struct TALER_KYCLOGIC_ProofHandle *ph,
}
ph->attributes = data2attributes (ph->pd,
data);
- GNUNET_JSON_parse_free (spec);
}