marsha icon indicating copy to clipboard operation
marsha copied to clipboard

✨(auth/api) add drf token auth to retrieve video detail

Open slandrault opened this issue 4 years ago • 2 comments

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!

slandrault avatar Oct 02 '20 07:10 slandrault

You can remove the release commit, this will be done in another PR and your commit is incomplete.

lunika avatar Oct 02 '20 08:10 lunika

Thx for the quick reply @lunika ! Sorry for the numerous typos, copy/paste quite too much there. I'll clean that asap.

slandrault avatar Oct 05 '20 12:10 slandrault