Skip to content

using rest_framework.authtoken instead of username and password when getting token #771

Open
@will-emmerson

Description

I am already using rest_framework.authtoken in an api, I wondered if it's possible to use this instead of username and password, to then get a time-limited JWT with a certain scope.
I can see that TokenObtainSerializer.validate calls Django's authenticate but rest_framework.authtoken isn't a part of this so it doesn't work. I am not sure the best way to go about this, should I just overwrite TokenObtainSerializer.validate to not call Django's authenticate?

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions