diff --git a/lms/djangoapps/course_home_api/course_metadata/v1/views.py b/lms/djangoapps/course_home_api/course_metadata/v1/views.py index 5398b9561cf42513dec89387336b8c66376e120d..c158071ffda1f32bb5ec2570d405a43f537fe970 100644 --- a/lms/djangoapps/course_home_api/course_metadata/v1/views.py +++ b/lms/djangoapps/course_home_api/course_metadata/v1/views.py @@ -7,6 +7,10 @@ from rest_framework.response import Response from opaque_keys.edx.keys import CourseKey +from edx_rest_framework_extensions.auth.jwt.authentication import JwtAuthentication +from edx_rest_framework_extensions.auth.session.authentication import SessionAuthenticationAllowInactiveUser +from openedx.core.lib.api.authentication import BearerAuthenticationAllowInactiveUser + from common.djangoapps.student.models import CourseEnrollment from lms.djangoapps.courseware.access import has_access from lms.djangoapps.courseware.masquerade import setup_masquerade @@ -50,6 +54,12 @@ class CourseHomeMetadataView(RetrieveAPIView): * 404 if the course is not available or cannot be seen. """ + authentication_classes = ( + JwtAuthentication, + BearerAuthenticationAllowInactiveUser, + SessionAuthenticationAllowInactiveUser, + ) + serializer_class = CourseHomeMetadataSerializer def get(self, request, *args, **kwargs): diff --git a/lms/djangoapps/course_home_api/outline/v1/views.py b/lms/djangoapps/course_home_api/outline/v1/views.py index ff749e4c3ec2ed3370298257e918377020eca1b4..7fdb64407cbfdaccf6aef3ef08ac18139ecd40b4 100644 --- a/lms/djangoapps/course_home_api/outline/v1/views.py +++ b/lms/djangoapps/course_home_api/outline/v1/views.py @@ -30,6 +30,7 @@ from lms.djangoapps.courseware.courses import get_course_date_blocks, get_course from lms.djangoapps.courseware.date_summary import TodaysDate from lms.djangoapps.courseware.masquerade import setup_masquerade from openedx.core.djangoapps.content.course_overviews.models import CourseOverview +from openedx.core.lib.api.authentication import BearerAuthenticationAllowInactiveUser from openedx.features.course_duration_limits.access import get_access_expiration_data from openedx.features.course_experience import COURSE_ENABLE_UNENROLLED_ACCESS_FLAG from openedx.features.course_experience.course_tools import CourseToolsPluginManager @@ -138,6 +139,12 @@ class OutlineTabView(RetrieveAPIView): """ + authentication_classes = ( + JwtAuthentication, + BearerAuthenticationAllowInactiveUser, + SessionAuthenticationAllowInactiveUser, + ) + serializer_class = OutlineTabSerializer def get(self, request, *args, **kwargs):