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

Use get_by_natural_key in jwt_get_secret_key #418

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

raverat
Copy link

@raverat raverat commented Jan 22, 2018

As stated in commit a3b4d44d2fc34d7752793ccbade2684707bf41da, the field user_id in payload will be deprecated.

Instead of explicitly using user_id field to retrieve user in utils.jwt_get_secret_key function, we should use User.objects.get_by_natural_key with the value in the payload dictionary at username_field key.

@codecov
Copy link

codecov bot commented Jan 22, 2018

Codecov Report

Merging #418 into master will decrease coverage by 0.33%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #418      +/-   ##
==========================================
- Coverage   90.67%   90.34%   -0.34%     
==========================================
  Files          14       12       -2     
  Lines         847      818      -29     
  Branches       29       29              
==========================================
- Hits          768      739      -29     
  Misses         66       66              
  Partials       13       13
Flag Coverage Δ
#codecov 90.34% <ø> (-0.34%) ⬇️
#dj110 87.04% <ø> (-0.45%) ⬇️
#dj111 87.04% <ø> (-0.45%) ⬇️
#dj18 89.48% <ø> (-0.36%) ⬇️
#dj19 89.48% <ø> (-0.36%) ⬇️
#drf31 89.48% <ø> (-0.36%) ⬇️
#drf32 89.48% <ø> (-0.36%) ⬇️
#drf33 89.48% <ø> (-0.36%) ⬇️
#drf34 90.34% <ø> (-0.34%) ⬇️
#drf35 89.97% <ø> (-0.35%) ⬇️
#drf36 89.97% <ø> (-0.35%) ⬇️
#py27 90.34% <ø> (-0.34%) ⬇️
#py33 89.11% <ø> (-0.38%) ⬇️
#py34 89.97% <ø> (+0.48%) ⬆️
#py35 87.04% <ø> (?)
#py36 87.04% <ø> (?)
Impacted Files Coverage Δ
rest_framework_jwt/models.py

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0a0bd40...a8ddaf1. Read the comment docs.

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.

None yet

1 participant