Add web API for working with a user's list of API tokens.
Review Request #6080 — Created July 8, 2014 and submitted — Latest diff uploaded
This adds new web API under
/users/<username>/api-tokens/
for creating
new tokens, updating existing tokens, getting tokens, and deleting
tokens.Only the owner of the tokens, and superusers, have any access to these
APIs.To get the docs to generate correctly, I had to add support for a new
verbose_name
field, in order for the document title to not turn 'api'
into 'Api'. Some other tweaks also had to be made to handle working with
the session state.
Unit tests pass.
Created tokens through the API. I tested with the global
/api/
and with
Local Sites. Verified the Local Site associated was correct.Built the API docs and verified that they looked correct.
This change adds 263 new tests (through mixins). It unfortunately also adds
another ~20 seconds to the test runtime.