summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-08-16 11:01:38 +0200
committerChristian Grothoff <christian@grothoff.org>2021-08-16 11:01:38 +0200
commitc1c40eaa24926273a6aa688e92e99d832aa1501e (patch)
treed5d01686cd125e70d1702ac5bbc2660c71d90760 /src/include
parent3b90e437e26013f5570d6c216b832c7bcd740712 (diff)
downloadanastasis-c1c40eaa24926273a6aa688e92e99d832aa1501e.tar.gz
anastasis-c1c40eaa24926273a6aa688e92e99d832aa1501e.tar.bz2
anastasis-c1c40eaa24926273a6aa688e92e99d832aa1501e.zip
-preparations for sepa auth plugin
Diffstat (limited to 'src/include')
-rw-r--r--src/include/anastasis_authorization_lib.h6
-rw-r--r--src/include/anastasis_authorization_plugin.h12
-rw-r--r--src/include/anastasis_database_plugin.h4
3 files changed, 17 insertions, 5 deletions
diff --git a/src/include/anastasis_authorization_lib.h b/src/include/anastasis_authorization_lib.h
index 9bebe1a..e8eaf74 100644
--- a/src/include/anastasis_authorization_lib.h
+++ b/src/include/anastasis_authorization_lib.h
@@ -30,14 +30,12 @@
*
* @param method name of the method to load
* @param AH_cfg configuration to use
- * @param[out] cost set to the cost for using the plugin during recovery
- * @return #GNUNET_OK on success
+ * @return plugin handle on success
*/
struct ANASTASIS_AuthorizationPlugin *
ANASTASIS_authorization_plugin_load (
const char *method,
- const struct GNUNET_CONFIGURATION_Handle *AH_cfg,
- struct TALER_Amount *cost);
+ const struct GNUNET_CONFIGURATION_Handle *AH_cfg);
/**
diff --git a/src/include/anastasis_authorization_plugin.h b/src/include/anastasis_authorization_plugin.h
index b159aaa..a1006a7 100644
--- a/src/include/anastasis_authorization_plugin.h
+++ b/src/include/anastasis_authorization_plugin.h
@@ -97,6 +97,18 @@ struct ANASTASIS_AuthorizationPlugin
void *cls;
/**
+ * Cost to GET the /truth using this method. Set by the plugin's
+ * loader, not by the plugin itself.
+ */
+ struct TALER_Amount cost;
+
+ /**
+ * True if the payment is managed internally by the
+ * authorization plugin.
+ */
+ bool payment_plugin_managed;
+
+ /**
* How long should a generated challenge be valid for this type of method.
*/
struct GNUNET_TIME_Relative code_validity_period;
diff --git a/src/include/anastasis_database_plugin.h b/src/include/anastasis_database_plugin.h
index 7ad47ca..069d0d9 100644
--- a/src/include/anastasis_database_plugin.h
+++ b/src/include/anastasis_database_plugin.h
@@ -584,13 +584,15 @@ struct ANASTASIS_DatabasePlugin
* @param cls closure
* @param truth_uuid identification of the challenge which the code corresponds to
* @param hashed_code code which the user provided and wants to verify
+ * @param[out] satisfied set to true if the challenge is set to satisfied
* @return transaction status
*/
enum ANASTASIS_DB_CodeStatus
(*verify_challenge_code)(
void *cls,
const struct ANASTASIS_CRYPTO_TruthUUIDP *truth_uuid,
- const struct GNUNET_HashCode *hashed_code);
+ const struct GNUNET_HashCode *hashed_code,
+ bool *satisfied);
/**