marsha
marsha copied to clipboard
✨(auth/api) add drf token auth to retrieve video detail
Purpose
This commit aim to add the drf token auth system. In this way, we can easily retrieve (GET) video informations from a staff user.
This commit was done because we sometimes need to retrieve data from videos to enhance the ElasticSearch index with new data. Without it, we would have to manually forge LTI tokens to get video data.
Proposal
In order to achieve this, the following steps need to be done:
- [x] Activate token auth with DRF
- [x] Add a Makefile command to easily create user token
- [x] Restrict access to GET and user.staff to the view we need access with this API token
- [x] Document!
You can remove the release commit, this will be done in another PR and your commit is incomplete.
Thx for the quick reply @lunika ! Sorry for the numerous typos, copy/paste quite too much there. I'll clean that asap.