{"categories":[{"label":"Session","url":"https://skillfed.io/packages/category/internet-www-http-session"}],"enrichment":{"capability":"Provides token-based authentication for Django REST Framework with per-device tokens, secure hashing, and configurable expiry\u2014addressing limitations of DRF's built-in TokenAuthentication.","skillfed_tags":["django-rest-framework","token-auth","multi-device"],"use_cases":["Multi-device mobile apps where each phone/tablet needs its own independent login token and logout does not affect other devices.","Web applications requiring server-side token revocation without forcing all users to re-authenticate.","APIs where database compromise should not immediately grant access to all user accounts via stolen tokens.","Systems needing automatic token expiry to limit the window of exposure if a token is leaked.","REST services that need to track and manage which client devices are currently authenticated."],"what_it_does":"Django-rest-knox is a token authentication module for Django REST Framework that replaces DRF's single-token-per-user model with a one-token-per-login approach. This allows multiple devices or clients to authenticate independently, each holding its own token that can be revoked without affecting other sessions. Tokens are stored as secure hashes (not plaintext) in the database, mitigating the risk of account compromise if the database is stolen. The package also adds token expiry support with a configurable default (10 hours), addressing a gap in DRF's native implementation.\n\nIt integrates directly into Django REST Framework's authentication system and requires only django and djangorestframework as dependencies. The package is actively maintained, supports modern Python versions (3.10 through 3.14) and recent Django releases (4.2 through 6.0), and carries no known security vulnerabilities. It is suitable for REST APIs that need per-device session management and stronger token security than DRF provides out of the box.","worth_installing":"Yes. Knox solves real security and multi-device problems that DRF's built-in TokenAuthentication does not address. It has low install friction, active maintenance, no known vulnerabilities, and a permissive MIT license. Install it if your Django REST API needs per-device tokens, secure token storage, or token expiry\u2014otherwise DRF's native authentication may suffice."},"id":"django-rest-knox","links":{"html":"https://skillfed.io/packages/django-rest-knox","md":"https://skillfed.io/packages/django-rest-knox.md","pypi":"https://pypi.org/project/django-rest-knox/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-07-12","license_spdx":null,"license_treatment":"permissive","name":"django-rest-knox","python_support":"supports_current","summary":"Authentication for django rest framework"},"popularity":{"monthly_downloads":823745,"position":4966,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"5.1.0"}
