Skip to content

SimpleJWT adapter

Reference for the optional adapter that plugs djangorestframework-simplejwt into restflow's async dispatch. See the SimpleJWT guide for installation and usage notes.

The class lives at restflow.authentication.simplejwt.SimpleJWTAuthentication and is not re-exported at the package root because importing it without the simplejwt extra installed raises ImportError. Install with pip install drf-restflow[simplejwt].

SimpleJWTAuthentication

Bases: BaseAuthentication, JWTAuthentication

Async aware adapter for djangorestframework-simplejwt. Reuses simplejwt's token validation and adds an async surface that resolves the user via async ORM.

aauthenticate async

aauthenticate(request)

Returns a (user, token) tuple for the bearer token in the Authorization header, or None when no token is supplied.