From c1c40eaa24926273a6aa688e92e99d832aa1501e Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 16 Aug 2021 11:01:38 +0200 Subject: -preparations for sepa auth plugin --- src/include/anastasis_authorization_lib.h | 6 ++---- src/include/anastasis_authorization_plugin.h | 12 ++++++++++++ src/include/anastasis_database_plugin.h | 4 +++- 3 files changed, 17 insertions(+), 5 deletions(-) (limited to 'src/include') 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 @@ -96,6 +96,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. */ 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); /** -- cgit v1.2.3