commit 9581338a2b574f977c518bd4944f58a8ce965de3
parent 1af02c371d48e24a1a0aa38f939168e10f5f4678
Author: Christian Grothoff <christian@grothoff.org>
Date: Sun, 8 Dec 2024 20:10:33 +0100
-fix implementation for v0.14 APIs
Diffstat:
5 files changed, 24 insertions(+), 16 deletions(-)
diff --git a/doc/sphinx/manpages/anastasis.conf.5.rst b/doc/sphinx/manpages/anastasis.conf.5.rst
@@ -113,6 +113,11 @@ name of the authorization plugin. Specific plugins may require
additional options, which are described in the respective sections
below.
+CURRENCY
+ Currency in which this plugin is to be paid. Must match the
+ currency given in COST. (This option should eventually be
+ removed, as it is redundant.)
+
COST
Fee the user has to pay to obtain a challenge from this
authorization plugin during recovery.
diff --git a/src/authorization/anastasis_authorization_plugin.c b/src/authorization/anastasis_authorization_plugin.c
@@ -91,16 +91,20 @@ ANASTASIS_authorization_plugin_load (
if (0 == strcmp (method,
ap->name))
return ap->authorization;
+ GNUNET_asprintf (&sec_name,
+ "authorization-%s",
+ method);
if (GNUNET_OK !=
TALER_config_get_currency (AH_cfg,
+ sec_name,
¤cy))
+ {
+ GNUNET_free (sec_name);
return NULL;
+ }
ap = GNUNET_new (struct AuthPlugin);
ap->ac.db = db;
ap->ac.cfg = AH_cfg;
- GNUNET_asprintf (&sec_name,
- "authorization-%s",
- method);
if (GNUNET_OK !=
TALER_config_get_amount (AH_cfg,
sec_name,
diff --git a/src/cli/test_reducer.conf b/src/cli/test_reducer.conf
@@ -6,10 +6,6 @@ TALER_CONFIG_HOME = $TALER_HOME/.config/taler/
TALER_CACHE_HOME = $TALER_HOME/.cache/taler/
TALER_RUNTIME_DIR = ${TMPDIR:-${TMP:-/tmp}}/${USER:-}/taler-system-runtime/
-[taler]
-CURRENCY = TESTKUDOS
-CURRENCY_ROUND_UNIT = TESTKUDOS:0.01
-
[anastasis]
DB = postgres
ANNUAL_FEE = TESTKUDOS:4.99
@@ -22,10 +18,12 @@ INSURANCE = TESTKUDOS:1.0
PAYMENT_BACKEND_URL = http://localhost:9966/
[authorization-question]
+CURRENCY = TESTKUDOS
COST = TESTKUDOS:0.0
-
[exchange]
+CURRENCY = TESTKUDOS
+CURRENCY_ROUND_UNIT = TESTKUDOS:0.01
MASTER_PUBLIC_KEY = 3NX5DJDBD8XVGZYHV3PBF8C3Z4GK48XD59YY5GF3CZE8AJM04WSG
AML_THRESHOLD = TESTKUDOS:1000000
MAX_KEYS_CACHING = forever
diff --git a/src/cli/test_reducer_free.conf b/src/cli/test_reducer_free.conf
@@ -6,10 +6,6 @@ TALER_CONFIG_HOME = $TALER_HOME/.config/taler/
TALER_CACHE_HOME = $TALER_HOME/.cache/taler/
TALER_RUNTIME_DIR = ${TMPDIR:-${TMP:-/tmp}}/${USER:-}/taler-system-runtime/
-[taler]
-CURRENCY = TESTKUDOS
-CURRENCY_ROUND_UNIT = TESTKUDOS:0.01
-
[anastasis]
DB = postgres
ANNUAL_FEE = TESTKUDOS:0
@@ -22,10 +18,13 @@ INSURANCE = TESTKUDOS:0
PAYMENT_BACKEND_URL = http://localhost:9966/
[authorization-question]
+CURRENCY = TESTKUDOS
COST = TESTKUDOS:0.0
[exchange]
+CURRENCY = TESTKUDOS
+CURRENCY_ROUND_UNIT = TESTKUDOS:0.01
MAX_KEYS_CACHING = forever
DB = postgres
MASTER_PRIV_FILE = ${TALER_DATA_HOME}/exchange/offline-keys/master.priv
diff --git a/src/testing/test_anastasis_api.conf b/src/testing/test_anastasis_api.conf
@@ -8,10 +8,6 @@ TALER_CONFIG_HOME = ${TALER_TEST_HOME:-${XDG_CONFIG_HOME:-${TALER_HOME}/.config/
TALER_CACHE_HOME = ${TALER_TEST_HOME:-${XDG_CACHE_HOME:-${TALER_HOME}/.cache/}/.cache/}taler/
TALER_RUNTIME_DIR = ${TMPDIR:-${TMP:-/tmp}}/taler-system-runtime/
-[taler]
-CURRENCY = EUR
-CURRENCY_ROUND_UNIT = EUR:0.01
-
[taler-helper-crypto-rsa]
LOOKAHEAD_SIGN = 12 days
@@ -51,15 +47,19 @@ BASE_URL = http://localhost:8086/
PAYMENT_BACKEND_URL = http://localhost:8080/
[authorization-question]
+CURRENCY = EUR
COST = EUR:0
[authorization-file]
+CURRENCY = EUR
COST = EUR:1
[authorization-email]
+CURRENCY = EUR
COST = EUR:0
[authorization-sms]
+CURRENCY = EUR
COST = EUR:0
COMMAND = ./sms_authentication.sh
@@ -84,6 +84,8 @@ PORT = 8083
BASE_URL = "http://localhost:8083/"
[exchange]
+CURRENCY = EUR
+CURRENCY_ROUND_UNIT = EUR:0.01
DB = postgres
PORT = 8081
SIGNKEY_LEGAL_DURATION = 2 years