Skip to content

Commit

Permalink
fixup! fix quality and missed change from rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
robrap committed Dec 19, 2023
1 parent 7014a0d commit 8fc82f3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
2 changes: 1 addition & 1 deletion docs/decisions/0002-remove-use-jwt-cookie-header.rst
@@ -1,5 +1,5 @@
2. Replace HTTP_USE_JWT_COOKIE Header
====================================
=====================================

Status
------
Expand Down
5 changes: 0 additions & 5 deletions edx_rest_framework_extensions/auth/jwt/authentication.py
Expand Up @@ -264,11 +264,6 @@ def _is_jwt_cookie_and_session_user_mismatch(self, request):
# adds early monitoring for the JWT LMS user_id
jwt_lms_user_id = self._get_and_monitor_jwt_cookie_lms_user_id(request)

is_forgiving_jwt_cookies_enabled = get_setting(ENABLE_FORGIVING_JWT_COOKIES)
# This toggle provides a temporary safety valve for rollout.
if not is_forgiving_jwt_cookies_enabled:
return False

# If we set the request user in middleware for JWT auth, then we'd actually be checking JWT vs JWT user id.
# Additionally, somehow the setting of request.user and the retrieving of request.user below causes some
# unknown issue in production-like environments, and this allows us to skip that case.
Expand Down

0 comments on commit 8fc82f3

Please sign in to comment.