summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2017-08-24 08:44:26 +0000
committerLars Wirzenius <liw@liw.fi>2017-08-24 08:44:26 +0000
commitc775b905b7a456eff43ba83f9e55aab3e8e4bb20 (patch)
tree7720f16cf303e59f270e9a7f6a1626570e85582c
parentcd6576058c4f480ab22b793ded698e54a2d8dabf (diff)
downloadapifw-c775b905b7a456eff43ba83f9e55aab3e8e4bb20.tar.gz
Add: log content of Authorization: header
-rw-r--r--apifw/__init__.py1
-rw-r--r--apifw/bottleapp.py2
2 files changed, 1 insertions, 2 deletions
diff --git a/apifw/__init__.py b/apifw/__init__.py
index e157a22..ac7aad1 100644
--- a/apifw/__init__.py
+++ b/apifw/__init__.py
@@ -13,7 +13,6 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
from .apixface import Api
from .http import (
HttpTransaction,
diff --git a/apifw/bottleapp.py b/apifw/bottleapp.py
index 9a2916e..6ca9659 100644
--- a/apifw/bottleapp.py
+++ b/apifw/bottleapp.py
@@ -109,7 +109,7 @@ class BottleAuthorizationPlugin:
value = request.get_header('Authorization', '')
if not value:
self.raise_unauthorized('No Authorization header')
- logging.debug('Request has Authorization header: good')
+ logging.debug('Request has Authorization header: {!r}'.format(value))
return value
def parse_authorization_header(self, value):