Skip to content

Commit

Permalink
feat: add check for enforcing jwt and lms user email match
Browse files Browse the repository at this point in the history
  • Loading branch information
syedsajjadkazmii committed Jan 26, 2024
1 parent dc860eb commit 9f527ca
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,11 @@ def test_authenticate_with_correct_jwt_cookie_and_django_request(
mock_set_custom_attribute.assert_any_call('jwt_auth_with_django_request', True)
mock_set_custom_attribute.assert_any_call('jwt_auth_result', 'success-cookie')

@override_settings(
EDX_DRF_EXTENSIONS={
ENABLE_JWT_AND_LMS_USER_EMAIL_MATCH: False
}
)
@mock.patch('edx_rest_framework_extensions.auth.jwt.authentication.set_custom_attribute')
def test_authenticate_csrf_protected(self, mock_set_custom_attribute):
"""
Expand Down

0 comments on commit 9f527ca

Please sign in to comment.