Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REST_FRAMEWORK authtoken cannot be changed from default setting #139

Open
iambonface opened this issue Jan 28, 2024 · 0 comments
Open

REST_FRAMEWORK authtoken cannot be changed from default setting #139

iambonface opened this issue Jan 28, 2024 · 0 comments

Comments

@iambonface
Copy link

iambonface commented Jan 28, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant