-first sketch of persona kyclogic

This commit is contained in:
Christian Grothoff 2022-08-17 21:35:30 +02:00
parent 9deca4a0c0
commit 14a240f7cc
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC
3 changed files with 1496 additions and 23 deletions

View File

@ -57,6 +57,7 @@ plugindir = $(libdir)/taler
plugin_LTLIBRARIES = \
libtaler_plugin_kyclogic_kycaid.la \
libtaler_plugin_kyclogic_oauth2.la \
libtaler_plugin_kyclogic_persona.la \
libtaler_plugin_kyclogic_template.la
libtaler_plugin_kyclogic_template_la_SOURCES = \
@ -90,4 +91,18 @@ libtaler_plugin_kyclogic_kycaid_la_LDFLAGS = \
-lcurl \
$(XLIB)
libtaler_plugin_kyclogic_persona_la_SOURCES = \
plugin_kyclogic_persona.c
libtaler_plugin_kyclogic_persona_la_LIBADD = \
$(LTLIBINTL)
libtaler_plugin_kyclogic_persona_la_LDFLAGS = \
$(TALER_PLUGIN_LDFLAGS) \
$(top_builddir)/src/json/libtalerjson.la \
$(top_builddir)/src/curl/libtalercurl.la \
$(top_builddir)/src/util/libtalerutil.la \
-lgnunetutil \
-ljansson \
-lcurl \
$(XLIB)
AM_TESTS_ENVIRONMENT=export TALER_PREFIX=$${TALER_PREFIX:-@libdir@};export PATH=$${TALER_PREFIX:-@prefix@}/bin:$$PATH;

View File

@ -85,11 +85,6 @@ struct TALER_KYCLOGIC_ProviderDetails
*/
char *form_id;
/**
* Where to redirect the client upon completion.
*/
char *post_kyc_redirect_url;
/**
* Validity time for a successful KYC process.
*/
@ -283,7 +278,6 @@ kycaid_unload_configuration (struct TALER_KYCLOGIC_ProviderDetails *pd)
GNUNET_free (pd->auth_token);
GNUNET_free (pd->form_id);
GNUNET_free (pd->section);
GNUNET_free (pd->post_kyc_redirect_url);
GNUNET_free (pd);
}
@ -329,18 +323,6 @@ kycaid_load_configuration (void *cls,
kycaid_unload_configuration (pd);
return NULL;
}
if (GNUNET_OK !=
GNUNET_CONFIGURATION_get_value_string (ps->cfg,
provider_section_name,
"KYC_KYCAID_POST_URL",
&pd->post_kyc_redirect_url))
{
GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
provider_section_name,
"KYC_KYCAID_POST_URL");
kycaid_unload_configuration (pd);
return NULL;
}
if (GNUNET_OK !=
GNUNET_CONFIGURATION_get_value_string (ps->cfg,
provider_section_name,
@ -577,8 +559,6 @@ kycaid_initiate (void *cls,
"https://api.kycaid.com/forms/%s/urls",
pd->form_id);
body = GNUNET_JSON_PACK (
GNUNET_JSON_pack_string ("redirect_url",
pd->post_kyc_redirect_url),
GNUNET_JSON_pack_data64_auto ("external_applicant_id",
account_id)
);
@ -1019,8 +999,6 @@ async_webhook_reply (void *cls)
{
struct TALER_KYCLOGIC_WebhookHandle *wh = cls;
fprintf (stderr,
"async reply\n");
wh->cb (wh->cb_cls,
wh->legi_row,
(0 == wh->legi_row)
@ -1172,7 +1150,7 @@ kycaid_webhook (void *cls,
GNUNET_break (0);
wh->resp = TALER_MHD_make_error (
TALER_EC_GENERIC_ALLOCATION_FAILURE,
verification_id);
NULL);
wh->response_code = MHD_HTTP_INTERNAL_SERVER_ERROR;
wh->task = GNUNET_SCHEDULER_add_now (&async_webhook_reply,
wh);

File diff suppressed because it is too large Load Diff