Moves request_initialization at start of dispatch so that WSGIRequest --> DRFRequest conversion can take place and request.user does DRF authentication
Testing
You need Postman to test this out (for JWT Authentication ease)
Go to LMS /admin/oauth2_provider/application/ and setup a new OAuth app. It should be set to Client Credentials public app.
For easy testing, you can set CourseRecommendationsViewAnonymousUserThrottle rate to 2/h to ensure that more than 2 requests by JWT Auth does not get throttled.
PROD-3994
Description
Moves request_initialization at start of dispatch so that WSGIRequest --> DRFRequest conversion can take place and request.user does DRF authentication
Testing
You need Postman to test this out (for JWT Authentication ease)
Go to LMS /admin/oauth2_provider/application/ and setup a new OAuth app. It should be set to Client Credentials public app.
Go to postman and make POST request against http://localhost:18000/oauth2/access_token. See pic below for body of request. It should return JWT token
Go to discovery and ensure there are recommendation entries at http://localhost:18381/admin/taxonomy_support/courserecommendation/
In a new Postman tab, make GET request against http://localhost:18381/taxonomy/api/v1/course_recommendations/. Add Authorization: JWT header.
For easy testing, you can set CourseRecommendationsViewAnonymousUserThrottle rate to 2/h to ensure that more than 2 requests by JWT Auth does not get throttled.