[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-bank] branch master updated: getting http headers th
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-bank] branch master updated: getting http headers the working way |
Date: |
Fri, 05 May 2017 22:51:44 +0200 |
This is an automated email from the git hooks/post-receive script.
marcello pushed a commit to branch master
in repository bank.
The following commit(s) were added to refs/heads/master by this push:
new c1b5e96 getting http headers the working way
c1b5e96 is described below
commit c1b5e96bfd1d98c89c367c9414a7af7a16ae924d
Author: Marcello Stanisci <address@hidden>
AuthorDate: Fri May 5 22:51:24 2017 +0200
getting http headers the working way
---
talerbank/app/tests.py | 2 +-
talerbank/app/views.py | 10 +++++++---
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/talerbank/app/tests.py b/talerbank/app/tests.py
index d6978e1..96ac2dc 100644
--- a/talerbank/app/tests.py
+++ b/talerbank/app/tests.py
@@ -102,7 +102,7 @@ class HistoryTestCase(TestCase):
def test_history(self):
c = Client()
response = c.get(reverse("history", urlconf=urls), {"auth": "basic",
"delta": "+4"},
- **{"X_TALER_BANK_USERNAME": "User",
"X_TALER_BANK_PASSWORD": "Password"})
+ **{"X-Taler-Bank-Username": "User",
"X-Taler-Bank-Password": "Password"})
self.assertEqual(200, response.status_code)
diff --git a/talerbank/app/views.py b/talerbank/app/views.py
index c8ab856..b841e58 100644
--- a/talerbank/app/views.py
+++ b/talerbank/app/views.py
@@ -332,7 +332,6 @@ def history(request):
"""
This API is used to get a list of transactions related to one user.
"""
-
# login caller
user_account = auth_and_login(request)
if not user_account:
@@ -408,8 +407,13 @@ def auth_and_login(request):
return JsonResponse(dict(error="auth method not supported"),
status=405)
- username = request.META.get("X-Taler-Bank-Username")
- password = request.META.get("X-Taler-Bank-Password")
+
+ logging.info(request.META.keys())
+
+ username = request.META["HTTP_X_TALER_BANK_USERNAME"]
+ password = request.META["HTTP_X_TALER_BANK_PASSWORD"]
+
+ logging.info("Authenticating '%s'/'%s'" % (username, password))
if not username or not password:
return False
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [taler-bank] branch master updated: getting http headers the working way,
gnunet <=