We still need to process the function if the auth header is invalid

Otherwise, the user gets a 500
This commit is contained in:
Joseph Schorr 2015-07-14 11:35:04 +03:00
parent f6a9afce90
commit 1c5300e439

View file

@ -187,7 +187,7 @@ def process_oauth(func):
normalized = [part.strip() for part in auth.split(' ') if part]
if normalized[0].lower() != 'bearer' or len(normalized) != 2:
logger.debug('Invalid oauth bearer token format.')
return
return func(*args, **kwargs)
token = normalized[1]
_validate_and_apply_oauth_token(token)