-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add JwtRedirectToLoginIfUnauthenticatedMiddleware
Middleware enables the DRF JwtAuthentication authentication class for endpoints using the LoginRedirectIfUnauthenticated permission class. Enables a DRF view to redirect the user to login when they are unauthenticated. It automatically enables JWT-cookie-based authentication by setting the `USE_JWT_COOKIE_HEADER` for endpoints using the LoginRedirectIfUnauthenticated permission. This can be used to convert a plain Django view using @login_required into a DRF APIView, which is useful to enable our DRF JwtAuthentication class. NOTE: This includes a breaking change that is unlikely to affect anyone unless they subclassed JwtAuthCookieMiddleware, which switched from using `process_request` to `process_view` so it would not run before this new middleware. ARCH-1051
- Loading branch information
Showing
6 changed files
with
272 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
""" edx Django REST Framework extensions. """ | ||
|
||
__version__ = '2.3.8' # pragma: no cover | ||
__version__ = '2.4.0' # pragma: no cover |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.