Skip to content
This repository has been archived by the owner on May 26, 2020. It is now read-only.

Optimization of DB queries when decoding token with per user secret. #360

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

jacoor
Copy link
Contributor

@jacoor jacoor commented Aug 29, 2017

When using token secret on user, DB is called twice to decode token:

  • once by id to get secret
  • second time by natural key in "authenticate_credentials"
    Because of two different keys used to call DB this database query was hard to cache.
    The code was changed to use "get_by_natural_key" in both cases.

Other improvements:

  • added py36 in travis - this works
  • set travis to use "precise" as default distribution, otherwise tests fails.

@jacoor
Copy link
Contributor Author

jacoor commented Aug 29, 2017

Hello @jpadilla,
you probably remember me from creating #310.
Now I added a little optimisation we could use on our projects soon. Could you release this in the near future, pretty please?

Thank you!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants