Welcome to 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
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 (
durin.models.Client) are configurable via Django’s Admin Interface.
Allows only specific clients to make authenticated requests to certain
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 him/her to re-authenticate for all API clients.
Durin tokens can be renewed to get a fresh expiry.
Durin provides a
durin.auth.CachedTokenAuthenticationbackend as well which uses memoization for faster look ups.
Get started at Installation.
- Settings (
- Authentication (
- Views (
- URLs (
- Permissions (
- Signals (
- FAQ: Why use durin over JWT or other libraries ?
- Run the tests locally