summaryrefslogtreecommitdiff
path: root/src/bank-lib/test_bank_interpreter.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bank-lib/test_bank_interpreter.c')
-rw-r--r--src/bank-lib/test_bank_interpreter.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/bank-lib/test_bank_interpreter.c b/src/bank-lib/test_bank_interpreter.c
index 346e3208..5f2d6664 100644
--- a/src/bank-lib/test_bank_interpreter.c
+++ b/src/bank-lib/test_bank_interpreter.c
@@ -188,7 +188,7 @@ interpreter_run (void *cls)
struct TALER_WireTransferIdentifierRawP wtid;
struct TALER_Amount amount;
const struct GNUNET_SCHEDULER_TaskContext *tc;
- json_t *auth;
+ struct TALER_BANK_AuthenticationData auth;
is->task = NULL;
tc = GNUNET_SCHEDULER_get_task_context ();
@@ -220,15 +220,13 @@ interpreter_run (void *cls)
GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_NONCE,
&cmd->details.admin_add_incoming.wtid,
sizeof (cmd->details.admin_add_incoming.wtid));
- auth = json_pack ("{s:s, s:{s:s, s:s}}",
- "type", "basic",
- "data",
- "username", "user",
- "password", "pass");
+ auth.method = TALER_BANK_AUTH_BASIC; /* or "NONE"? */
+ auth.details.basic.username = "user";
+ auth.details.basic.password = "pass";
cmd->details.admin_add_incoming.aih
= TALER_BANK_admin_add_incoming (is->ctx,
- auth,
"http://localhost:8081",
+ &auth,
cmd->details.admin_add_incoming.exchange_base_url,
&cmd->details.admin_add_incoming.wtid,
&amount,
@@ -236,7 +234,6 @@ interpreter_run (void *cls)
cmd->details.admin_add_incoming.credit_account_no,
&add_incoming_cb,
is);
- json_decref (auth);
if (NULL == cmd->details.admin_add_incoming.aih)
{
GNUNET_break (0);