Merge pull request #728 from alphagov/case-insensitive-auth-header

Make bearer prefix on auth header case insensitive
This commit is contained in:
Chris Hill-Scott
2016-11-07 14:59:09 +01:00
committed by GitHub
2 changed files with 4 additions and 3 deletions

View File

@@ -27,7 +27,7 @@ def get_auth_token(req):
if not auth_header:
raise AuthError('Unauthorized, authentication token must be provided', 401)
auth_scheme = auth_header[:7]
auth_scheme = auth_header[:7].title()
if auth_scheme != 'Bearer ':
raise AuthError('Unauthorized, authentication bearer scheme must be used', 401)