diff options
| author | drnextgis <rykovd@gmail.com> | 2017-02-09 03:24:04 +0700 |
|---|---|---|
| committer | drnextgis <rykovd@gmail.com> | 2017-02-09 03:24:04 +0700 |
| commit | cf40ff8ca0b8cd32cd184b8b09ccfcb90e356e4e (patch) | |
| tree | 41166a6166c9b674f18640c73ef196296c2e223c | |
| parent | 39d89556229df54189abe5e327dc9f716563a4a6 (diff) | |
| download | pyramid-cf40ff8ca0b8cd32cd184b8b09ccfcb90e356e4e.tar.gz pyramid-cf40ff8ca0b8cd32cd184b8b09ccfcb90e356e4e.tar.bz2 pyramid-cf40ff8ca0b8cd32cd184b8b09ccfcb90e356e4e.zip | |
Make code more readable by using namedtuple attribute
| -rw-r--r-- | pyramid/authentication.py | 2 |
1 files changed, 1 insertions, 1 deletions
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 |
