diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-05-04 15:18:43 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-05-04 15:18:43 +0200 |
commit | 234dbcc7b71ac98e7f63393e454377d1e2ae11c7 (patch) | |
tree | 3a1c687c7ccc10d7e14363f0802e16a6f9a60a1c /src/bank-lib/test_bank_interpreter.c | |
parent | 57502edf1549e3f1aa26f866681077290b692269 (diff) |
switch bank api to new authentication method API
Diffstat (limited to 'src/bank-lib/test_bank_interpreter.c')
-rw-r--r-- | src/bank-lib/test_bank_interpreter.c | 13 |
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 346e32085..5f2d66648 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); |