diff options
author | ms <ms@taler.net> | 2021-10-14 13:30:52 +0200 |
---|---|---|
committer | ms <ms@taler.net> | 2021-10-14 13:30:52 +0200 |
commit | 093adb84994c8ead295476acc8a136caf12d0f1b (patch) | |
tree | cf7c078b28c5f6893703b82de0531beae04679b1 /cli | |
parent | 2da0ba51265ff6c691681443faa2a21a80ea584c (diff) | |
download | libeufin-093adb84994c8ead295476acc8a136caf12d0f1b.tar.gz libeufin-093adb84994c8ead295476acc8a136caf12d0f1b.tar.bz2 libeufin-093adb84994c8ead295476acc8a136caf12d0f1b.zip |
cli does only basic auth
Diffstat (limited to 'cli')
-rwxr-xr-x | cli/bin/libeufin-cli | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/cli/bin/libeufin-cli b/cli/bin/libeufin-cli index dd7e3f18..023efe1c 100755 --- a/cli/bin/libeufin-cli +++ b/cli/bin/libeufin-cli @@ -280,11 +280,6 @@ class SandboxContext: self.sandbox_base_url = None self.username, self.password = self.require_sandbox_credentials() - def require_sandbox_admin_token(self): - token = os.environ.get("LIBEUFIN_SANDBOX_TOKEN") - if not token: - raise click.UsageError("Please define LIBEUFIN_SANDBOX_TOKEN in the environment") - return token def require_sandbox_credentials(self): sandbox_username = os.environ.get("LIBEUFIN_SANDBOX_USERNAME") sandbox_password = os.environ.get("LIBEUFIN_SANDBOX_PASSWORD") @@ -1057,7 +1052,7 @@ def make_ebics_host(obj, host_id): resp = post( url, json=dict(hostID=host_id, ebicsVersion="2.5"), - headers={"Authorization": "Bearer " + obj.require_sandbox_admin_token()} + auth=auth.HTTPBasicAuth(obj.nexus_username, obj.nexus_password), ) except Exception as e: print(e) @@ -1102,7 +1097,7 @@ def create_ebics_subscriber(obj, host_id, partner_id, user_id): resp = post( url, json=dict(hostID=host_id, partnerID=partner_id, userID=user_id), - headers={"Authorization": "Bearer " + obj.require_sandbox_admin_token()} + auth=auth.HTTPBasicAuth(obj.nexus_username, obj.nexus_password), ) except Exception as e: print(e) @@ -1176,7 +1171,7 @@ def associate_bank_account( try: resp = post( url, json=body, - headers={"Authorization": "Bearer " + obj.require_sandbox_admin_token()} + auth=auth.HTTPBasicAuth(obj.nexus_username, obj.nexus_password), ) except Exception as e: print(e) |