diff options
author | Christian Grothoff <christian@grothoff.org> | 2021-11-15 20:00:45 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2021-11-15 20:00:45 +0100 |
commit | e5ead880579cbac93353b72e96221c84206a7403 (patch) | |
tree | 0f40cdc235a9e75f137fe3ac927f43f263b02826 /src/exchange/taler-exchange-httpd.c | |
parent | 0325a79631d1abba7fdf414748a34c0e8bca55c3 (diff) | |
download | exchange-e5ead880579cbac93353b72e96221c84206a7403.tar.gz exchange-e5ead880579cbac93353b72e96221c84206a7403.tar.bz2 exchange-e5ead880579cbac93353b72e96221c84206a7403.zip |
complete oauth logic (in theory)
Diffstat (limited to 'src/exchange/taler-exchange-httpd.c')
-rw-r--r-- | src/exchange/taler-exchange-httpd.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/exchange/taler-exchange-httpd.c b/src/exchange/taler-exchange-httpd.c index 08f2ba471..c29984e2d 100644 --- a/src/exchange/taler-exchange-httpd.c +++ b/src/exchange/taler-exchange-httpd.c @@ -1197,6 +1197,34 @@ parse_kyc_oauth_cfg (void) if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_string (TEH_cfg, "exchange-kyc-oauth2", + "KYC_INFO_URL", + &s)) + { + GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, + "exchange-kyc-oauth2", + "KYC_INFO_URL"); + return GNUNET_SYSERR; + } + if ( (! TALER_url_valid_charset (s)) || + ( (0 != strncasecmp (s, + "http://", + strlen ("http://"))) && + (0 != strncasecmp (s, + "https://", + strlen ("https://"))) ) ) + { + GNUNET_log_config_invalid (GNUNET_ERROR_TYPE_ERROR, + "exchange-kyc-oauth2", + "KYC_INFO_URL", + "not a valid URL"); + GNUNET_free (s); + return GNUNET_SYSERR; + } + TEH_kyc_config.details.oauth2.info_url = s; + + if (GNUNET_OK != + GNUNET_CONFIGURATION_get_value_string (TEH_cfg, + "exchange-kyc-oauth2", "KYC_OAUTH2_CLIENT_ID", &s)) { |