You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In utils.py, the coded import is from rest_framework.authtoken.models import Token
But in the settings, if the DEFAULT_AUTHENTICATION_CLASSES is overwritten by any other classes other than the REST_FRAMEWORK default TokenAuthentication, then user gets an error when invoking Token.objects.get_or_create(user=user)
Ideally if the framework default is changed, then this should be overwritten to users preferred auth classes.
Example, when as a user I choose to use KNOX, as an Auth Creator, this should overwrite the default Token creator.
The text was updated successfully, but these errors were encountered:
In
utils.py
, the coded import isfrom rest_framework.authtoken.models import Token
But in the settings, if the DEFAULT_AUTHENTICATION_CLASSES is overwritten by any other classes other than the REST_FRAMEWORK default TokenAuthentication, then user gets an error when invoking
Token.objects.get_or_create(user=user)
Ideally if the framework default is changed, then this should be overwritten to users preferred auth classes.
Example, when as a user I choose to use KNOX, as an Auth Creator, this should overwrite the default Token creator.
The text was updated successfully, but these errors were encountered: