From cf40ff8ca0b8cd32cd184b8b09ccfcb90e356e4e Mon Sep 17 00:00:00 2001 From: drnextgis Date: Thu, 9 Feb 2017 03:24:04 +0700 Subject: Make code more readable by using namedtuple attribute --- pyramid/authentication.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyramid/authentication.py b/pyramid/authentication.py index 2ee5576d9..03b204e1a 100644 --- a/pyramid/authentication.py +++ b/pyramid/authentication.py @@ -1098,7 +1098,7 @@ class BasicAuthAuthenticationPolicy(CallbackAuthenticationPolicy): """ The userid parsed from the ``Authorization`` request header.""" credentials = extract_http_basic_credentials(request) if credentials: - return credentials[0] + return credentials.username def remember(self, request, userid, **kw): """ A no-op. Basic authentication does not provide a protocol for -- cgit v1.2.3