1👍
✅
The great thing about DRF is that it supports multiple authentication schemes. By default it uses session + basic auth (exactly what you need).
'DEFAULT_AUTHENTICATION_CLASSES': (
'rest_framework.authentication.SessionAuthentication',
'rest_framework.authentication.BasicAuthentication'
),
where SessionAuthentication
is reusing the standard django auth flow (username/pass) + support basic auth.
Source:stackexchange.com