Add support for OAuth2 in the web API

Review Request #9030 — Created June 22, 2017 and submitted — Latest diff uploaded

Information

Djblets
release-0.10.x
537d872...

Reviewers

Djblets now supports OAuth2 authentication in the Web API. Documentation
has been added, in the form of a guide, showing how to enable OAuth2
token access in applications.

This support is added via the django_oauth_toolkit package, which is a
development dependnecy but not a deployment dependency. The OAuth2
features will simply be non-functional if the dependency is not
installed.

Some minor cleanup has been done in the ResourceAPITokenMixin to
help ensure methods from mixins don't override eachother. Additionally,
The WebAPITestCaseMixin was fixed so that additional arguments can be
passed to the underlying client request.

Based on work by: Minh Le Hoang (https://reviews.reviewboard.org/r/7997/)

  • Ran unit tests.
  • Tested this with an upcoming change for adding OAuth2 token access to
    Review Board.
  • Built the docs and read through them.