aboutsummaryrefslogtreecommitdiff
path: root/src/testing/testing_api_cmd_oauth.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-11-15 20:00:45 +0100
committerChristian Grothoff <christian@grothoff.org>2021-11-15 20:00:45 +0100
commite5ead880579cbac93353b72e96221c84206a7403 (patch)
tree0f40cdc235a9e75f137fe3ac927f43f263b02826 /src/testing/testing_api_cmd_oauth.c
parent0325a79631d1abba7fdf414748a34c0e8bca55c3 (diff)
downloadexchange-e5ead880579cbac93353b72e96221c84206a7403.tar.gz
exchange-e5ead880579cbac93353b72e96221c84206a7403.tar.bz2
exchange-e5ead880579cbac93353b72e96221c84206a7403.zip
complete oauth logic (in theory)
Diffstat (limited to 'src/testing/testing_api_cmd_oauth.c')
-rw-r--r--src/testing/testing_api_cmd_oauth.c22
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);