gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libeufin] branch master updated: cli does only basic auth


From: gnunet
Subject: [libeufin] branch master updated: cli does only basic auth
Date: Thu, 14 Oct 2021 13:31:00 +0200

This is an automated email from the git hooks/post-receive script.

ms pushed a commit to branch master
in repository libeufin.

The following commit(s) were added to refs/heads/master by this push:
     new 093adb8  cli does only basic auth
093adb8 is described below

commit 093adb84994c8ead295476acc8a136caf12d0f1b
Author: ms <ms@taler.net>
AuthorDate: Thu Oct 14 13:30:52 2021 +0200

    cli does only basic auth
---
 cli/bin/libeufin-cli | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/cli/bin/libeufin-cli b/cli/bin/libeufin-cli
index dd7e3f1..023efe1 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)

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]