We're using rest_framework.authentication.TokenAuthentication to authenticate API users in Django REST Framework using an access token.
Is there a way to use this same class to authenticate users for Django generally?
I've tried adding it straight in to AUTHENTICATION_BACKENDS but it doesn't work:
AUTHENTICATION_BACKENDS = (
    # Needed to login by username in Django admin, regardless of `allauth`
    "django.contrib.auth.backends.ModelBackend",
    # `allauth` specific authentication methods, such as login by e-mail
    "allauth.account.auth_backends.AuthenticationBackend",
    'rest_framework.authentication.TokenAuthentication',
)
Is there a quick way to do this or do I need to write a custom authentication backend?