Skip to content

REST_FRAMEWORK authtoken cannot be changed from default setting #139

@iambonface

Description

@iambonface

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions