# jazzband/django-rest-knox

Authentication Module for django rest auth

Repository: https://github.com/jazzband/django-rest-knox
Canonical: https://ross.abutalabs.com/products/django-rest-knox
Language: Python
License: MIT
License Family: permissive
Last push: 2026-08-24T17:41:21+00:00

## Health v2 (maintenance only)
Score: 86/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 60, longevity 100
- inputs: {"age_days": 4011, "days_push": 9, "days_rel": 52, "gap_med": 324.0, "n_releases_24m": 3}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1259, forks 226 (observed 2026-08-28T04:04:09.686549+00:00)

## What it is
django-rest-knox is a token-based authentication library for Django REST Framework that improves on DRF's built-in TokenAuthentication. It supports one token per device, securely hashed token storage, and configurable token expiry.

## Use cases
- token authentication for django rest framework apis
- support multiple device logins with separate tokens per user
- store auth tokens securely hashed in the database
- add token expiry to drf authentication
- implement server-side logout that deletes tokens
- force logout of all clients by invalidating all tokens

## When to choose
- you use Django REST Framework and need per-device tokens
- you want tokens stored as secure hashes rather than plaintext
- you need configurable token expiration and server-side logout

## When to avoid
- you use JWT-based authentication instead of database-backed tokens
- your project does not use Django or Django REST Framework
- you need OAuth or social login flows, which Knox does not provide

## Facets
- artifact type: library
- maturity: active
- function: auth, security
- domain: web-development, backend, security, apis
- platform: python
- tags: django, django-rest-framework, token-authentication, rest-api, web-server

## Member repositories
- jazzband/django-rest-knox (main) score 86

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:09.686549+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T05:05:30.905605+00:00, confidence not recorded.
  - readme: https://github.com/jazzband/django-rest-knox (fetched 2026-08-28T04:04:09.686549+00:00, sha 8c66d2885ceb)
  - registry_pypi: https://pypi.org/pypi/django-rest-knox/json (fetched 2026-08-29T12:17:25.042746+00:00, sha cbc0b16a8913)
- Data as of 2026-08-30T08:39:29.467469+00:00.
