Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes several significant changes to focusing on refactoring middleware, updating URL patterns, and improving authentication mechanisms for API calls. The most significant changes involve updating middleware to derive from
MiddlewareMixin
, and refactoring URL patterns to usepath
instead ofre_path
.Middleware Refactoring:
PermissionsMiddleware
,TrustedAccessMiddleware
, and other middleware classes to inherit fromMiddlewareMixin
for better compatibility with Django's middleware system. [1] [2]APIAuthenticationMiddleware
for handling API authentication using JWT tokens.URL Patterns Update:
mxlive/remote/urls.py
to usepath
instead ofre_path
and added JWT authentication views.mxlive/remote/urls_v2.py
to separate versioned API endpoints.Authentication Improvements:
VerificationMixin
withAuthenticationRequiredMixin
in view classes to ensure that only authenticated users can access certain endpoints without requiring URL signatures. [1] [2] [3]get_v2_user
andget_v3_user
to handle user authentication for different API versions.Code Cleanup:
make_table
function frommxlive/lims/stats.py
and replaced it with an import frommxlive.utils.stats
.View Enhancements:
request.user
directly instead of fetching the user from URL parameters, aligning with the new authentication approach. [1] [2] [3]