Welcome to Django-Rest-Durin!

https://img.shields.io/pypi/v/django-rest-durin https://img.shields.io/lgtm/grade/python/g/Eshaan7/django-rest-durin.svg?logo=lgtm&logoWidth=18 https://travis-ci.com/Eshaan7/django-rest-durin.svg?branch=main https://codecov.io/gh/Eshaan7/django-rest-durin/branch/main/graph/badge.svg?token=S9KEI0PU05

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 (durin.models.Client) are configurable via Django’s Admin Interface.

    • Allows only specific clients to make authenticated requests to certain APIViews 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 him/her to re-authenticate for all API clients.

  • Durin tokens can be renewed to get a fresh expiry.

  • Durin provides a durin.auth.CachedTokenAuthentication backend as well which uses memoization for faster look ups.

API Reference

If you are looking for information on a specific function, class or method, this part of the documentation is for you.

Indices and tables