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 649 forks source link

[RDY] Added support for Custom Exception Handler #374

Open ideallical opened 6 years ago

ideallical commented 6 years ago

This PR makes it possible to enable DRF's custom exception handler, by default the old behaviour is kept for backwards compatibility. Typo has been fixed.

blueyed commented 6 years ago

Please add tests for it.

ideallical commented 6 years ago

Should be ready for merge now, @blueyed

blueyed commented 6 years ago

Thanks! Can you rebase it please, so we can see how https://github.com/GetBlimp/django-rest-framework-jwt/pull/382 has an impact?

ideallical commented 6 years ago

the branche has been rebased @blueyed Somehow, the codecov plugin doesn't appear in this thread (although it's being used in Travis). Shall I close this PR and create a new one to see if that helps? @blueyed

codecov[bot] commented 6 years ago

Codecov Report

Merging #374 into master will increase coverage by 0.21%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #374      +/-   ##
==========================================
+ Coverage   90.62%   90.84%   +0.21%     
==========================================
  Files          14       14              
  Lines         843      863      +20     
  Branches       29       29              
==========================================
+ Hits          764      784      +20     
  Misses         66       66              
  Partials       13       13
Flag Coverage Δ
#codecov 90.84% <100%> (+0.21%) :arrow_up:
#dj110 87.71% <100%> (+0.29%) :arrow_up:
#dj111 87.71% <100%> (+0.29%) :arrow_up:
#dj18 90.03% <100%> (+0.23%) :arrow_up:
#dj19 90.03% <100%> (+0.23%) :arrow_up:
#drf31 90.03% <100%> (+0.23%) :arrow_up:
#drf32 90.03% <100%> (+0.23%) :arrow_up:
#drf33 90.03% <100%> (+0.23%) :arrow_up:
#drf34 90.84% <100%> (+0.21%) :arrow_up:
#drf35 90.49% <100%> (+0.22%) :arrow_up:
#drf36 90.49% <100%> (+0.22%) :arrow_up:
#py27 90.84% <100%> (+0.21%) :arrow_up:
#py33 89.68% <100%> (+0.24%) :arrow_up:
#py34 89.68% <100%> (+0.24%) :arrow_up:
Impacted Files Coverage Δ
rest_framework_jwt/settings.py 100% <ø> (ø) :arrow_up:
tests/test_views.py 100% <100%> (ø) :arrow_up:
rest_framework_jwt/views.py 92.5% <100%> (ø) :arrow_up:

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 38897e7...943eb02. Read the comment docs.

blueyed commented 6 years ago

Maybe re-opening helps for codecov.

Otherwise I've thought that I've left a comment for this to be the default, but have not?!

blueyed commented 6 years ago

See also #386.

ideallical commented 6 years ago

So, coverage report says coverage went up. Time to merge? @blueyed

blueyed commented 6 years ago

@ideallical Thanks, but I think this should be just the default, without a setting for this.

blueyed commented 6 years ago

@jpadilla ?

draskomikic commented 6 years ago

Hi guys, I am also interested in this feature, when do you expect it will be merged ?

ilstreltsov commented 5 years ago

@blueyed Making this behavior (raise exception) as default will break backward compatibility, right? So i suggest just to merge PR as it is. Up!