jazzband / django-rest-knox

Authentication Module for django rest auth
MIT License
1.18k stars 213 forks source link

Add label as optional field to identify a token #205

Closed ciur closed 4 years ago

ciur commented 4 years ago

Hi!

would it be possible to include optional label field to the model? I use knox auth in papermerge project and I find it confusing to identify tokens by their digest. From user's point of view, digests and tokens look similar.

Here is the use case.

Note that tokens are not created in login view (I dont use knox' login view at all).

ciur commented 4 years ago

I don't understand what/why exactly CI failed :(

johnraz commented 4 years ago

The CI fails because you didn't add the model migrations.

To be honest I don't find this to be generic enough to be included in the project, you could easily attach a metadata object to the model and customise things as you wish.