libeufin

Integration and sandbox testing for FinTech APIs and data formats
Log | Files | Refs | Submodules | README | LICENSE

commit 597f1946b0d140e13e8fb67025f529bd9be36c24
parent 201f43d0302cc9dfb1b9c605d7cd6197b2888e2e
Author: Thien-Thi Nguyen <ttn@gnuvola.org>
Date:   Fri, 21 Jan 2022 05:27:53 -0500

add HTTP Basic auth to several ‘sandbox’ subcommands

The following commands are affected:
- sandbox ebicshost list
- sandbox ebicssubscriber list
- sandbox bankaccount list
- sandbox bankaccount transactions

Diffstat:
Mcli/bin/libeufin-cli | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/cli/bin/libeufin-cli b/cli/bin/libeufin-cli @@ -1069,7 +1069,7 @@ def list_ebics_host(obj): sandbox_base_url = obj.require_sandbox_base_url() url = urljoin_nodrop(sandbox_base_url, "/admin/ebics/hosts") try: - resp = get(url) + resp = get(url,auth=auth.HTTPBasicAuth(obj.username, obj.password)) except Exception as e: print(e) print("Could not reach sandbox") @@ -1114,7 +1114,7 @@ def list_ebics_subscriber(obj): sandbox_base_url = obj.require_sandbox_base_url() url = urljoin_nodrop(sandbox_base_url, "/admin/ebics/subscribers") try: - resp = get(url) + resp = get(url,auth=auth.HTTPBasicAuth(obj.username, obj.password)) except Exception as e: print(e) print("Could not reach sandbox") @@ -1319,7 +1319,7 @@ def bankaccount_list(obj): sandbox_base_url = obj.require_sandbox_base_url() url = urljoin_nodrop(sandbox_base_url, f"/admin/bank-accounts") try: - resp = get(url) + resp = get(url,auth=auth.HTTPBasicAuth(obj.username, obj.password)) except Exception as e: print(e) print("Could not reach sandbox") @@ -1338,7 +1338,7 @@ def transactions_list(obj, account_label): sandbox_base_url, f"/admin/bank-accounts/{account_label}/transactions" ) try: - resp = get(url) + resp = get(url,auth=auth.HTTPBasicAuth(obj.username, obj.password)) except Exception as e: print(e) print("Could not reach sandbox")