Authentication in Django REST Framework can be configured globally as a subkey of the REST_FRAMEWORK
variable in settings.py, just like the rest of the default framework configurations.
REST_FRAMEWORK = {
'DEFAULT_AUTHENTICATION_CLASSES': (
'rest_framework.authentication.BasicAuthentication',
'rest_framework.authentication.SessionAuthentication',
)
}