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

Tags / Names for API tokens #1549

Open
january3 opened this issue Jan 22, 2025 · 2 comments
Open

Tags / Names for API tokens #1549

january3 opened this issue Jan 22, 2025 · 2 comments
Labels
app: tokens Issue in the tokens app feature Requested feature or enhancement tbd Comments wanted, spec/schedule/prioritization to be decided, etc.
Milestone

Comments

@january3
Copy link
Member

Problem

Sometimes I would like to create a token for a specific client or purpose

Solution

It should be possible to specify a name / tag for a token (to remember that "ah, this is my cubi-tk token")

@january3 january3 added the feature Requested feature or enhancement label Jan 22, 2025
@mikkonie
Copy link
Collaborator

Good idea. I'll have to see if django-rest-knox supports this or if it can be easily extended.

@mikkonie mikkonie added environment Issues of dependencies, CI, deployment etc. tbd Comments wanted, spec/schedule/prioritization to be decided, etc. app: tokens Issue in the tokens app labels Jan 22, 2025
@mikkonie
Copy link
Collaborator

mikkonie commented Jan 22, 2025

The django-rest-knox AuthToken model does not have a field for naming your tokens. However, in recent releases there seems to be a mechanism for swapping the model with your custom one. There is a bit of risk in that, as we need to then make sure our custom model stays compatible with future django-rest-knox releases, but this does seem doable.

I'm tagging this for v1.2 for now and will look further into it once developing that milestone.

@mikkonie mikkonie added this to the v1.2.0 milestone Jan 22, 2025
@mikkonie mikkonie removed the environment Issues of dependencies, CI, deployment etc. label Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app: tokens Issue in the tokens app feature Requested feature or enhancement tbd Comments wanted, spec/schedule/prioritization to be decided, etc.
Projects
None yet
Development

No branches or pull requests

2 participants