diff options
Diffstat (limited to 'src/kyclogic')
-rw-r--r-- | src/kyclogic/kyclogic-kycaid.conf | 6 | ||||
-rw-r--r-- | src/kyclogic/kyclogic-oauth2.conf | 19 | ||||
-rw-r--r-- | src/kyclogic/kyclogic-persona.conf | 12 | ||||
-rw-r--r-- | src/kyclogic/kyclogic_api.c | 21 | ||||
-rw-r--r-- | src/kyclogic/plugin_kyclogic_oauth2.c | 2 |
5 files changed, 27 insertions, 33 deletions
diff --git a/src/kyclogic/kyclogic-kycaid.conf b/src/kyclogic/kyclogic-kycaid.conf index 753fb689d..6db48083e 100644 --- a/src/kyclogic/kyclogic-kycaid.conf +++ b/src/kyclogic/kyclogic-kycaid.conf @@ -9,10 +9,14 @@ LOGIC = kycaid USER_TYPE = INDIVIDUAL PROVIDED_CHECKS = EXAMPLE_DO_NOT_USE +# Generic converter that does nothing. +CONVERTER = cat + + # How long is the KYC check valid? KYC_KYCAID_VALIDITY = forever -# Program that converts Persona KYC data into the +# Program that converts Kycaid KYC data into the # GNU Taler format. KYC_KYCAID_CONVERTER_HELPER = taler-exchange-kyc-kycaid-converter.sh diff --git a/src/kyclogic/kyclogic-oauth2.conf b/src/kyclogic/kyclogic-oauth2.conf index 57e1fc13a..2f78818a2 100644 --- a/src/kyclogic/kyclogic-oauth2.conf +++ b/src/kyclogic/kyclogic-oauth2.conf @@ -9,6 +9,17 @@ LOGIC = oauth2 USER_TYPE = INDIVIDUAL PROVIDED_CHECKS = EXAMPLE_DO_NOT_USE +# Generic converter. +CONVERTER = cat + +# Converter that converts OAuth2.0 data about the user +# into GNU Taler standardized attribute data. +# +# This is just an example, you need to pick the right converter +# for the provider! +# +KYC_OAUTH2_CONVERTER_HELPER = taler-exchange-kyc-oauth2-converter.sh + # How long is the KYC check valid? KYC_OAUTH2_VALIDITY = forever @@ -25,11 +36,3 @@ KYC_OAUTH2_POST_URL = http://example.com/thank-you # For authentication to the OAuth2.0 service KYC_OAUTH2_CLIENT_ID = testcase KYC_OAUTH2_CLIENT_SECRET = password - -# Mustach template that converts OAuth2.0 data about the user -# into GNU Taler standardized attribute data. -# -# This is just an example, you need to pick the right converter -# for the provider! -# -KYC_OAUTH2_CONVERTER_HELPER = taler-exchange-kyc-oauth2-converter.sh diff --git a/src/kyclogic/kyclogic-persona.conf b/src/kyclogic/kyclogic-persona.conf index 2d52a9ee0..42211406d 100644 --- a/src/kyclogic/kyclogic-persona.conf +++ b/src/kyclogic/kyclogic-persona.conf @@ -20,6 +20,14 @@ LOGIC = persona USER_TYPE = INDIVIDUAL PROVIDED_CHECKS = EXAMPLE_DO_NOT_USE +# Generic converter that does nothing. +CONVERTER = cat + +# Program that converts Persona KYC data into the +# GNU Taler format. +KYC_PERSONA_CONVERTER_HELPER = taler-exchange-kyc-persona-converter.sh + + # How long is the KYC check valid? KYC_PERSONA_VALIDITY = forever @@ -29,10 +37,6 @@ KYC_PERSONA_SUBDOMAIN = taler # Authentication token to use. KYC_PERSONA_AUTH_TOKEN = persona_sandbox_42 -# Program that converts Persona KYC data into the -# GNU Taler format. -KYC_PERSONA_CONVERTER_HELPER = taler-exchange-kyc-persona-converter.sh - # Form to use. KYC_PERSONA_TEMPLATE_ID = itempl_Uj6Xxxxx diff --git a/src/kyclogic/kyclogic_api.c b/src/kyclogic/kyclogic_api.c index bb163f4e4..71075c237 100644 --- a/src/kyclogic/kyclogic_api.c +++ b/src/kyclogic/kyclogic_api.c @@ -35,11 +35,6 @@ struct TALER_KYCLOGIC_KycProvider { /** - * Cost of running this provider's KYC process. - */ - struct TALER_Amount cost; - - /** * Name of the provider. */ char *provider_name; @@ -535,6 +530,8 @@ cleanup: void TALER_KYCLOGIC_rules_free (struct TALER_KYCLOGIC_LegitimizationRuleSet *lrs) { + if (NULL == lrs) + return; for (unsigned int i = 0; i<lrs->num_kyc_rules; i++) { struct TALER_KYCLOGIC_KycRule *rule @@ -1019,25 +1016,12 @@ static enum GNUNET_GenericReturnValue add_provider (const struct GNUNET_CONFIGURATION_Handle *cfg, const char *section) { - struct TALER_Amount cost; char *logic; char *converter; struct TALER_KYCLOGIC_Plugin *lp; struct TALER_KYCLOGIC_ProviderDetails *pd; if (GNUNET_OK != - TALER_config_get_amount (cfg, - section, - "COST", - &cost)) - { - GNUNET_log_config_invalid (GNUNET_ERROR_TYPE_ERROR, - section, - "COST", - "amount required"); - return GNUNET_SYSERR; - } - if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_string (cfg, section, "CONVERTER", @@ -1085,7 +1069,6 @@ add_provider (const struct GNUNET_CONFIGURATION_Handle *cfg, struct TALER_KYCLOGIC_KycProvider *kp; kp = GNUNET_new (struct TALER_KYCLOGIC_KycProvider); - kp->cost = cost; kp->provider_name = GNUNET_strdup (§ion[strlen ("kyc-provider-")]); kp->converter_name = converter; diff --git a/src/kyclogic/plugin_kyclogic_oauth2.c b/src/kyclogic/plugin_kyclogic_oauth2.c index 3a1f50bcf..32843f63c 100644 --- a/src/kyclogic/plugin_kyclogic_oauth2.c +++ b/src/kyclogic/plugin_kyclogic_oauth2.c @@ -114,7 +114,7 @@ struct TALER_KYCLOGIC_ProviderDetails /** * Name of the program we use to convert outputs - * from Persona into our JSON inputs. + * from OAuth2 outputs into our JSON inputs. */ char *conversion_binary; |