From e5ead880579cbac93353b72e96221c84206a7403 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 15 Nov 2021 20:00:45 +0100 Subject: complete oauth logic (in theory) --- src/testing/testing_api_cmd_oauth.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'src/testing/testing_api_cmd_oauth.c') 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); -- cgit v1.2.3