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

Proper prefix and hashed_key fields #60

Closed
florimondmanca opened this issue Jun 29, 2019 · 0 comments · Fixed by #62
Closed

Proper prefix and hashed_key fields #60

florimondmanca opened this issue Jun 29, 2019 · 0 comments · Fixed by #62
Assignees
Labels
enhancement Enhancement of an existing feature
Milestone

Comments

@florimondmanca
Copy link
Owner

Is your feature request related to a problem? Please describe.
As of 1.3, the ID of an API key is a concatenation of the prefix and hashed_key. These are available as properties on the model. We are willing to move to an integer ID in the future (see #41), but storing the prefix and hashed_key in their own fields is a necessary first step.

Describe the solution you'd like

  • Add prefix and hashed_key fields to AbstractAPIKey (they must be non-editable, and the prefix field must be unique).
  • Keep the ID as it is today, i.e. a concatenation of prefix and hashed_key.
  • Add a migration guide, addressing in particular users who may already be using AbstractAPIKey.

Describe alternatives you've considered
Keep things as they are, i.e. do the migration of prefix, hashed_key and idall in 2.0: this introduces much bigger changes and upgrade barriers. Populating the prefix and hashed_key introduces no breaking changes at all.

Additional context
/

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

Successfully merging a pull request may close this issue.

1 participant