Skip to content

Commit

Permalink
Merge branch 'release/0.6.7'
Browse files Browse the repository at this point in the history
  • Loading branch information
pavlov99 committed Feb 17, 2015
2 parents d376193 + 29f19f7 commit 533e8e9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion jsonapi/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
""" JSON:API realization."""
__version = (0, 6, 6)
__version = (0, 6, 7)

__version__ = version = '.'.join(map(str, __version))
__project__ = PROJECT = __name__
6 changes: 3 additions & 3 deletions jsonapi/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ class DjangoToolkitOAuthAuthenticator(object):
@classmethod
def authenticate(cls, request):
from oauth2_provider.models import AccessToken
if 'Authorization' in request.META:
auth = request.META['Authorization'].split()
if 'HTTP_AUTHORIZATION' in request.META:
auth = request.META['HTTP_AUTHORIZATION'].split()
if len(auth) == 2 and auth[0].lower() == "bearer":
token = auth[1].decode('utf8')
token = auth[1]
queryset = AccessToken.objects.filter(token=token)
try:
user = queryset.get().user
Expand Down

0 comments on commit 533e8e9

Please sign in to comment.