summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
authorThien-Thi Nguyen <ttn@gnuvola.org>2022-01-21 05:27:53 -0500
committerThien-Thi Nguyen <ttn@gnuvola.org>2022-01-21 05:27:53 -0500
commit597f1946b0d140e13e8fb67025f529bd9be36c24 (patch)
treeea3610ed2d0fc45ea0623dca9534a708ac5290df /cli
parent201f43d0302cc9dfb1b9c605d7cd6197b2888e2e (diff)
downloadlibeufin-597f1946b0d140e13e8fb67025f529bd9be36c24.tar.gz
libeufin-597f1946b0d140e13e8fb67025f529bd9be36c24.tar.bz2
libeufin-597f1946b0d140e13e8fb67025f529bd9be36c24.zip
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 (limited to 'cli')
-rwxr-xr-xcli/bin/libeufin-cli8
1 files changed, 4 insertions, 4 deletions
diff --git a/cli/bin/libeufin-cli b/cli/bin/libeufin-cli
index e02461eb..f9a95f5b 100755
--- 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")