✍️ New post showing how to implement HTTP Bearer authentication in Django.
No need for a heavyweight framework: you can write token-based auth for a small API in just a few lines of code, for which this post shows a reusable decorator.
https://adamj.eu/tech/2025/11/25/django-bearer-authentication/

Django: implement HTTP bearer authentication - Adam Johnson
HTTP has a general authentication framework that defines a pattern into which various authentication schemes can fit. Clients may provide an authorization request header that contains a credential. If authorization is missing or invalid, the server may respond with a 401 (Unauthorized) status code, including a www-authenticate header advertising what authentication schemes are supported. Otherwise, the server can respond with the authenticated resource.
adamj.eu
Link author:
Adam Johnson
@adamchainz@fosstodon.org