Skip to content

Commit

Permalink
Remove jwt_refresh_cookie
Browse files Browse the repository at this point in the history
The login_refresh endpoint in the LMS was updated to be based on the
user's session, rather than requiring an additional refresh cookie, so
removing any references to the unused refresh cookie and
JWT_AUTH_REFRESH_COOKIE setting.

ARCH-418
  • Loading branch information
nasthagiri authored and robrap committed Nov 7, 2019
1 parent 491d7e3 commit 00185b9
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 7 deletions.
2 changes: 1 addition & 1 deletion edx_rest_framework_extensions/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
""" edx Django REST Framework extensions. """

__version__ = '2.4.3' # pragma: no cover
__version__ = '2.4.4' # pragma: no cover
4 changes: 0 additions & 4 deletions edx_rest_framework_extensions/auth/jwt/cookies.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ def jwt_cookie_signature_name():
return settings.JWT_AUTH.get('JWT_AUTH_COOKIE_SIGNATURE') or 'edx-jwt-cookie-signature'


def jwt_refresh_cookie_name():
return settings.JWT_AUTH.get('JWT_AUTH_REFRESH_COOKIE') or 'edx-jwt-refresh-cookie'


def get_decoded_jwt(request):
"""
Grab jwt from jwt cookie in request if possible.
Expand Down
2 changes: 0 additions & 2 deletions edx_rest_framework_extensions/auth/jwt/tests/test_cookies.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ class TestJwtAuthCookies(TestCase):
(cookies.jwt_cookie_name, 'JWT_AUTH_COOKIE', 'custom-jwt-cookie-name'),
(cookies.jwt_cookie_header_payload_name, 'JWT_AUTH_COOKIE_HEADER_PAYLOAD', 'custom-jwt-header-payload-name'),
(cookies.jwt_cookie_signature_name, 'JWT_AUTH_COOKIE_SIGNATURE', 'custom-jwt-signature-name'),
(cookies.jwt_refresh_cookie_name, 'JWT_AUTH_REFRESH_COOKIE', 'custom-jwt-refresh-name'),
)
@ddt.unpack
def test_get_setting_value(self, jwt_cookie_func, setting_name, setting_value):
Expand All @@ -32,7 +31,6 @@ def test_get_setting_value(self, jwt_cookie_func, setting_name, setting_value):
(cookies.jwt_cookie_name, 'edx-jwt-cookie'),
(cookies.jwt_cookie_header_payload_name, 'edx-jwt-cookie-header-payload'),
(cookies.jwt_cookie_signature_name, 'edx-jwt-cookie-signature'),
(cookies.jwt_refresh_cookie_name, 'edx-jwt-refresh-cookie'),
)
@ddt.unpack
def test_get_default_value(self, jwt_cookie_func, expected_default_value):
Expand Down

0 comments on commit 00185b9

Please sign in to comment.