[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-merchant] branch master updated: ApiKey option
From: |
gnunet |
Subject: |
[taler-merchant] branch master updated: ApiKey option |
Date: |
Mon, 27 Jul 2020 11:24:24 +0200 |
This is an automated email from the git hooks/post-receive script.
ms pushed a commit to branch master
in repository merchant.
The following commit(s) were added to refs/heads/master by this push:
new 2714911 ApiKey option
2714911 is described below
commit 27149117a486a8f339c6a3e19740c9ff91ea205e
Author: MS <ms@taler.net>
AuthorDate: Mon Jul 27 11:24:07 2020 +0200
ApiKey option
---
src/merchant-tools/taler-merchant-setup-reserve.c | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/src/merchant-tools/taler-merchant-setup-reserve.c
b/src/merchant-tools/taler-merchant-setup-reserve.c
index 66ece5a..b229af3 100644
--- a/src/merchant-tools/taler-merchant-setup-reserve.c
+++ b/src/merchant-tools/taler-merchant-setup-reserve.c
@@ -86,6 +86,11 @@ static char *certfile;
*/
static char *keyfile;
+/**
+ * This value goes in the Authorization:-header.
+ */
+static char *apikey;
+
/**
* Passphrase to decrypt client's TLS private key file (optional).
*/
@@ -189,6 +194,18 @@ run (void *cls,
certfile,
keyfile,
keypass);
+ if (NULL != apikey)
+ {
+ // not assuming that libcurl copies this value.
+ char *auth_header;
+
+ GNUNET_assert (GNUNET_OK == GNUNET_asprintf (&auth_header,
+ "Authorizattion: ApiKey %s",
+ apikey));
+ GNUNET_CURL_append_header (ctx,
+ auth_header);
+ }
+
/* setup termination logic */
GNUNET_SCHEDULER_add_shutdown (&do_shutdown,
NULL);
@@ -261,6 +278,11 @@ main (int argc,
"KEYFILEPASSPHRASE",
"passphrase needed to decrypt the TLS client
private key file",
&keypass),
+ GNUNET_GETOPT_option_string ('K',
+ "apikey",
+ "APIKEY",
+ "API key to use in the HTTP request",
+ &apikey),
GNUNET_GETOPT_option_string ('t',
"type",
"CERTTYPE",
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-merchant] branch master updated: ApiKey option,
gnunet <=