Allow a request with invalid basic auth to still be considered anonymous, rather than throwing a 401.

This commit is contained in:
yackob03 2013-12-19 15:18:14 -05:00
parent 5088114ed7
commit 56722d1ac1

View file

@ -34,7 +34,7 @@ def process_basic_auth(auth):
if len(credentials) != 2:
logger.debug('Invalid basic auth credential format.')
if credentials[0] == '$token':
elif credentials[0] == '$token':
# Use as token auth
try:
token = model.load_token_data(credentials[1])
@ -77,7 +77,6 @@ def process_basic_auth(auth):
# We weren't able to authenticate via basic auth.
logger.debug('Basic auth present but could not be validated.')
abort(401)
def process_token(auth):