Per API client token authentication Module for django rest framework.
Project description
Django-Rest-Durin
Per API client token authentication Module for Django REST Framework.
The idea is to provide one library that does token auth for multiple Web/CLI/Mobile API clients via one interface but allows different token configuration for each client.
Durin authentication is token based, similar to the TokenAuthentication
built in to DRF. However, it adds some extra sauce:
- Durin allows multiple tokens per user. But only one token each user per API client.
- Each user token is associated with an API Client. These API Clients are configurable via Django's Admin Interface. This allows restricting certain
APIViews
to only specific clients or vice-a-versa. - All Durin tokens have an expiration time. This expiration time can be different per API client.
- Durin provides an option for a logged in user to remove all tokens that the server has - forcing them to re-authenticate for all API clients.
- Durin tokens can be renewed to get a fresh expiry.
- Durin provides a
CachedTokenAuthentication
backend as well which uses memoization for faster look ups.
More information can be found in the Documentation.
Django Compatibility Matrix
If your project uses an older verison of Django or Django Rest Framework, you can choose an older version of this project.
This Project | Python Version | Django Version | Django Rest Framework |
---|---|---|---|
0.1.* | 3.5 - 3.9 | 2.2, 3.0, 3.1 | 3.7>= |
Make sure to use at least DRF 3.10
when using Django 3.0
or newer.
Changelog / Releases
All releases should be listed in the releases tab on github.
See CHANGELOG.md for a more detailed listing.
License
This project is published with the MIT License. See https://choosealicense.com/licenses/mit/ for more information about what this means.
Credits
Durin is inpired by the django-rest-knox and django-rest-multitokenauth libraries and adopts some learnings, docs and code from both.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file django-rest-durin-0.1.0.tar.gz
.
File metadata
- Download URL: django-rest-durin-0.1.0.tar.gz
- Upload date:
- Size: 10.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 10bdee9b2e5d9719acd1a5090ce116da2f6e576f71cce8247bf793b3c3eaebeb |
|
MD5 | 54d167a817f80ba02be4005a0905806e |
|
BLAKE2b-256 | d6e2153839cb3c5c1c759837c9591cfe11207b86d292722735ad0ce27aa5e1f8 |
File details
Details for the file django_rest_durin-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: django_rest_durin-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 98c41726d569da24f7ec86090b94cfee03695bab66b1b94b9d2ab5c36247a35f |
|
MD5 | 969671a7c61fb455cc752514abeb91d2 |
|
BLAKE2b-256 | ed1855fa1e7c530153b9d8943a3d0a121dc3e37ff10751cde8031c8e1e2f5ed9 |