jpadilla / django-rest-framework-jwt

JSON Web Token Authentication support for Django REST Framework
http://jpadilla.github.io/django-rest-framework-jwt/
MIT License
3.19k stars 650 forks source link

Support custom exception handler #424

Open An4ik opened 6 years ago

An4ik commented 6 years ago

I have implemented custom exception handler function (docs) and found that authentication views return (obtain, refresh) the data in different format. So, that's why I suggested the solution by this commit.

codecov[bot] commented 6 years ago

Codecov Report

Merging #424 into master will decrease coverage by 0.33%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #424      +/-   ##
==========================================
- 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% <100%> (-0.34%) :arrow_down:
#dj110 87.04% <100%> (-0.45%) :arrow_down:
#dj111 87.04% <100%> (-0.45%) :arrow_down:
#dj18 89.48% <100%> (-0.36%) :arrow_down:
#dj19 89.48% <100%> (-0.36%) :arrow_down:
#drf31 89.48% <100%> (-0.36%) :arrow_down:
#drf32 89.48% <100%> (-0.36%) :arrow_down:
#drf33 89.48% <100%> (-0.36%) :arrow_down:
#drf34 90.34% <100%> (-0.34%) :arrow_down:
#drf35 89.97% <100%> (-0.35%) :arrow_down:
#drf36 89.97% <100%> (-0.35%) :arrow_down:
#py27 90.34% <100%> (-0.34%) :arrow_down:
#py33 89.11% <100%> (-0.38%) :arrow_down:
#py34 89.97% <100%> (+0.48%) :arrow_up:
#py35 87.04% <100%> (?)
#py36 87.04% <100%> (?)
Impacted Files Coverage Δ
rest_framework_jwt/settings.py 100% <ø> (ø) :arrow_up:
rest_framework_jwt/views.py 92.5% <100%> (ø) :arrow_up:
rest_framework_jwt/models.py
rest_framework_jwt/utils.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...7d02d46. Read the comment docs.