]> git.ipfire.org Git - thirdparty/patchwork.git/commit
REST: Enable token auth support
authorStephen Finucane <stephen@that.guru>
Fri, 9 Jun 2017 17:18:23 +0000 (18:18 +0100)
committerStephen Finucane <stephen@that.guru>
Wed, 14 Jun 2017 08:38:25 +0000 (09:38 +0100)
commit274763e7b66db5e128994e817876bf534692470e
treea382557925db4be040aaa73f655fb77a10e901f9
parent02f8c2818bfd33bd02e8b6a64809a114f91c5000
REST: Enable token auth support

Token authentication is generally viewed as a more secure option for API
authentication than storing a username and password.

Django REST Framework gives us a TokenAuthentication class and an authtoken
app that we can use to generate random tokens and authenticate to API
endpoints. Enable this support and add some tests to validate correct
behavior.

Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Signed-off-by: Stephen Finucane <stephen@that.guru>
patchwork/models.py
patchwork/settings/base.py
patchwork/tests/test_bundles.py
patchwork/views/bundle.py
patchwork/views/utils.py