diff options
author | Christian Grothoff <christian@grothoff.org> | 2021-02-02 12:20:43 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2021-02-02 12:20:43 +0100 |
commit | 96726fd5ab6dc067af4957c3d1826f9fd2745c95 (patch) | |
tree | 0aceccf83f16d0f1bde0b2dd0bfd41a795b9c1a0 /src/include | |
parent | 0232c377c39611f4c476ec9464356f0ae40497d9 (diff) | |
download | merchant-96726fd5ab6dc067af4957c3d1826f9fd2745c95.tar.gz merchant-96726fd5ab6dc067af4957c3d1826f9fd2745c95.tar.bz2 merchant-96726fd5ab6dc067af4957c3d1826f9fd2745c95.zip |
extend client and testing libs to support setting authentication tokens (#6731)
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/taler_merchant_service.h | 25 | ||||
-rw-r--r-- | src/include/taler_merchant_testing_lib.h | 4 |
2 files changed, 20 insertions, 9 deletions
diff --git a/src/include/taler_merchant_service.h b/src/include/taler_merchant_service.h index f7a8d667..9937750b 100644 --- a/src/include/taler_merchant_service.h +++ b/src/include/taler_merchant_service.h @@ -503,6 +503,7 @@ typedef void * @param default_max_deposit_fee default maximum deposit fee merchant is willing to pay * @param default_wire_transfer_delay default wire transfer delay merchant will ask for * @param default_pay_delay default validity period for offers merchant makes + * @param auth_token authorization token needed to access the instance, can be NULL * @param cb function to call with the * backend's instances information * @param cb_cls closure for @a config_cb @@ -523,6 +524,7 @@ TALER_MERCHANT_instances_post ( const struct TALER_Amount *default_max_deposit_fee, struct GNUNET_TIME_Relative default_wire_transfer_delay, struct GNUNET_TIME_Relative default_pay_delay, + const char *auth_token, TALER_MERCHANT_InstancesPostCallback cb, void *cb_cls); @@ -572,6 +574,7 @@ typedef void * @param default_max_deposit_fee default maximum deposit fee merchant is willing to pay * @param default_wire_transfer_delay default wire transfer delay merchant will ask for * @param default_pay_delay default validity period for offers merchant makes + * @param auth_token authorization token needed to access the instance, can be NULL * @param cb function to call with the * backend's instances information * @param cb_cls closure for @a config_cb @@ -592,6 +595,7 @@ TALER_MERCHANT_instance_patch ( const struct TALER_Amount *default_max_deposit_fee, struct GNUNET_TIME_Relative default_wire_transfer_delay, struct GNUNET_TIME_Relative default_pay_delay, + const char *auth_token, TALER_MERCHANT_InstancePatchCallback cb, void *cb_cls); @@ -1244,14 +1248,16 @@ struct TALER_MERCHANT_PostOrdersReply * Details of the reply, depending on the HTTP * status code. */ - union { + union + { /** * Details provided if the @e hr.http_status is * #MHD_HTTP_OK and the order was created. */ - struct { - + struct + { + /** * order id of the newly created order */ @@ -1262,14 +1268,15 @@ struct TALER_MERCHANT_PostOrdersReply * (NULL if it was NOT generated). */ const struct TALER_ClaimTokenP *token; - + } ok; /** * Details provided if the @e hr.http_status is * #MHD_HTTP_GONE because a product was out of stock. - */ - struct { + */ + struct + { /** * ID of the product of the order that is out of * stock. @@ -1291,11 +1298,11 @@ struct TALER_MERCHANT_PostOrdersReply * restocked? 0 for unknown. */ struct GNUNET_TIME_Absolute restock_expected; - + } gone; - + } details; - + }; diff --git a/src/include/taler_merchant_testing_lib.h b/src/include/taler_merchant_testing_lib.h index 8cd23d9d..c1f8d4dc 100644 --- a/src/include/taler_merchant_testing_lib.h +++ b/src/include/taler_merchant_testing_lib.h @@ -137,6 +137,7 @@ TALER_TESTING_cmd_merchant_post_instances (const char *label, * @param default_max_deposit_fee default maximum deposit fee merchant is willing to pay * @param default_wire_transfer_delay default wire transfer delay merchant will ask for * @param default_pay_delay default validity period for offers merchant makes + * @param auth_token authorization token needed to access the instance, can be NULL * @param http_status expected HTTP response code. * @return the command. */ @@ -155,6 +156,7 @@ TALER_TESTING_cmd_merchant_post_instances2 ( const char *default_max_deposit_fee, struct GNUNET_TIME_Relative default_wire_transfer_delay, struct GNUNET_TIME_Relative default_pay_delay, + const char *auth_token, unsigned int http_status); @@ -175,6 +177,7 @@ TALER_TESTING_cmd_merchant_post_instances2 ( * @param default_max_deposit_fee default maximum deposit fee merchant is willing to pay * @param default_wire_transfer_delay default wire transfer delay merchant will ask for * @param default_pay_delay default validity period for offers merchant makes + * @param auth_token authorization token needed to access the instance, can be NULL * @param http_status expected HTTP response code. * @return the command. */ @@ -193,6 +196,7 @@ TALER_TESTING_cmd_merchant_patch_instance ( const char *default_max_deposit_fee, struct GNUNET_TIME_Relative default_wire_transfer_delay, struct GNUNET_TIME_Relative default_pay_delay, + const char *auth_token, unsigned int http_status); |