Allow a request with invalid basic auth to still be considered anonymous, rather than throwing a 401.
This commit is contained in:
parent
5088114ed7
commit
56722d1ac1
1 changed files with 1 additions and 2 deletions
|
@ -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):
|
||||
|
|
Reference in a new issue