diff options
author | Christian Grothoff <christian@grothoff.org> | 2021-10-19 21:02:04 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2021-10-19 21:02:10 +0200 |
commit | 778a402d07706462818e9c9d01520fd3d8d238d8 (patch) | |
tree | 18ffbbb763cbeaf05de595e461317d2387ae60ec /src/exchange/taler-exchange-httpd_kyc-check.c | |
parent | fa30a132a53196eec1ac731e332a075ba8b93991 (diff) | |
download | exchange-778a402d07706462818e9c9d01520fd3d8d238d8.tar.gz exchange-778a402d07706462818e9c9d01520fd3d8d238d8.tar.bz2 exchange-778a402d07706462818e9c9d01520fd3d8d238d8.zip |
-implement more of the KYC handlers
Diffstat (limited to 'src/exchange/taler-exchange-httpd_kyc-check.c')
-rw-r--r-- | src/exchange/taler-exchange-httpd_kyc-check.c | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/src/exchange/taler-exchange-httpd_kyc-check.c b/src/exchange/taler-exchange-httpd_kyc-check.c index 13f5810b8..ae1ab34f2 100644 --- a/src/exchange/taler-exchange-httpd_kyc-check.c +++ b/src/exchange/taler-exchange-httpd_kyc-check.c @@ -143,12 +143,31 @@ TEH_handler_kyc_check ( return res; if (! kcc.kyc.ok) { + char *url; + char *redirect_uri; + char *redirect_uri_encoded; + GNUNET_assert (TEH_KYC_OAUTH2 == TEH_kyc_config.mode); - return TALER_MHD_REPLY_JSON_PACK ( + GNUNET_asprintf (&redirect_uri, + "%s/kyc-proof/%llu", + TEH_base_url, + payment_target_uuid); + redirect_uri_encoded = TALER_urlencode (redirect_uri); + GNUNET_free (redirect_uri); + GNUNET_asprintf (&url, + "%s/login?client_id=%s&redirect_uri=%s", + TEH_kyc_config.details.oauth2.url, + TEH_kyc_config.details.oauth2.client_id, + redirect_uri_encoded); + GNUNET_free (redirect_uri_encoded); + + res = TALER_MHD_REPLY_JSON_PACK ( rc->connection, MHD_HTTP_ACCEPTED, GNUNET_JSON_pack_string ("kyc_url", - TEH_kyc_config.details.oauth2.url)); + url)); + GNUNET_free (url); + return res; } { struct TALER_ExchangePublicKeyP pub; |