From 23e990df1dc6ffd24b7c688f4379885c0078a7d9 Mon Sep 17 00:00:00 2001 From: Clinton Blackburn Date: Wed, 11 May 2016 22:23:29 -0400 Subject: [PATCH 1/2] Replaced all usages of JSONWebTokenAuthentication with JwtAuthentication JwtAuthentication knows how to parse our custom claims. ECOM-4414 --- openedx/core/djangoapps/user_api/accounts/views.py | 4 ++-- requirements/edx/base.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/openedx/core/djangoapps/user_api/accounts/views.py b/openedx/core/djangoapps/user_api/accounts/views.py index d391fd1e1e..fd3adf0417 100644 --- a/openedx/core/djangoapps/user_api/accounts/views.py +++ b/openedx/core/djangoapps/user_api/accounts/views.py @@ -5,7 +5,7 @@ For more information, see: https://openedx.atlassian.net/wiki/display/TNL/User+API """ from django.db import transaction -from rest_framework_jwt.authentication import JSONWebTokenAuthentication +from edx_rest_framework_extensions.authentication import JwtAuthentication from rest_framework import permissions from rest_framework import status from rest_framework.response import Response @@ -141,7 +141,7 @@ class AccountView(APIView): If the update is successful, updated user account data is returned. """ authentication_classes = ( - OAuth2AuthenticationAllowInactiveUser, SessionAuthenticationAllowInactiveUser, JSONWebTokenAuthentication + OAuth2AuthenticationAllowInactiveUser, SessionAuthenticationAllowInactiveUser, JwtAuthentication ) permission_classes = (permissions.IsAuthenticated,) parser_classes = (MergePatchParser,) diff --git a/requirements/edx/base.txt b/requirements/edx/base.txt index 8fcd5718ba..ca27b17878 100644 --- a/requirements/edx/base.txt +++ b/requirements/edx/base.txt @@ -39,7 +39,7 @@ django==1.8.13 djangorestframework-jwt==1.8.0 djangorestframework-oauth==1.1.0 edx-ccx-keys==0.1.2 -edx-drf-extensions==0.5.0 +edx-drf-extensions==0.5.1 edx-lint==0.4.3 edx-management-commands==0.1.1 edx-django-oauth2-provider==1.0.3 From e53d36b363590a8cd9685af1f177178ed592b96d Mon Sep 17 00:00:00 2001 From: Clinton Blackburn Date: Wed, 11 May 2016 22:25:20 -0400 Subject: [PATCH 2/2] Updated edx-organizations This latest version uses our custom JwtAuthentication class. ECOM-4414 --- requirements/edx/base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/edx/base.txt b/requirements/edx/base.txt index ca27b17878..9f67d96dc6 100644 --- a/requirements/edx/base.txt +++ b/requirements/edx/base.txt @@ -45,7 +45,7 @@ edx-management-commands==0.1.1 edx-django-oauth2-provider==1.0.3 edx-oauth2-provider==1.0.1 edx-opaque-keys==0.2.1 -edx-organizations==0.4.0 +edx-organizations==0.4.1 edx-rest-api-client==1.2.1 edx-search==0.1.2 facebook-sdk==0.4.0