diff options
author | Christian Grothoff <christian@grothoff.org> | 2021-11-15 20:00:45 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2021-11-15 20:00:45 +0100 |
commit | e5ead880579cbac93353b72e96221c84206a7403 (patch) | |
tree | 0f40cdc235a9e75f137fe3ac927f43f263b02826 /src/testing | |
parent | 0325a79631d1abba7fdf414748a34c0e8bca55c3 (diff) | |
download | exchange-e5ead880579cbac93353b72e96221c84206a7403.tar.xz |
complete oauth logic (in theory)
Diffstat (limited to 'src/testing')
-rw-r--r-- | src/testing/testing_api_cmd_oauth.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/testing/testing_api_cmd_oauth.c b/src/testing/testing_api_cmd_oauth.c index b71cc8386..64cb6c031 100644 --- a/src/testing/testing_api_cmd_oauth.c +++ b/src/testing/testing_api_cmd_oauth.c @@ -169,6 +169,28 @@ handler_cb (void *cls, unsigned int hc; json_t *body; + if (0 == strcasecmp (method, + MHD_HTTP_METHOD_GET)) + { + body = GNUNET_JSON_PACK ( + GNUNET_JSON_pack_string ( + "status", + "success"), + GNUNET_JSON_pack_object_steal ( + "data", + GNUNET_JSON_PACK ( + GNUNET_JSON_pack_string ("id", + "XXXID12345678")))); + return TALER_MHD_reply_json_steal (connection, + body, + MHD_HTTP_OK); + } + if (0 != strcasecmp (method, + MHD_HTTP_METHOD_POST)) + { + GNUNET_break (0); + return MHD_NO; + } if (NULL == rc) { rc = GNUNET_new (struct RequestCtx); |