-
Notifications
You must be signed in to change notification settings - Fork 652
Conversation
Also, a lot of the logic in the base serializer is the same as in the |
@Jwpe thanks, checking this out. I think someone tried abstracting that logic from the |
@Jwpe just to be clear, were you gonna tackle the base API view in this PR? |
@jpadilla happy to do so, but I can also make a separate PR if you'd rather split it up. |
@Jwpe seems right to me if it were part of this one. |
…on serializer. Added a verification view. Added verification tests.
@jpadilla refactored to add the base class. Rebased on the latest master - I can squash the commits if you like but otherwise this should be good to go. |
…om a dev-facing serializer error.
cff17f8
to
3b5eec9
Compare
@jpadilla fixed! |
@Jwpe this looks perfect, thanks again for the great work! Only thing missing is adding a bit on it to the docs since we are adding a new feature here. |
@jpadilla added a section to the documentation. Let me know what you think! |
@Jwpe looks great, thanks again! |
@jpadilla no worries! Thanks for making an awesome library. |
This PR adds a verification view:
verify_jwt_token
, which checks if a JWT POSTed to it is valid and that the user exists.Much of the functionality is the same as the existing
refresh
view and serializer. I abstracted out the majority of the shared serializer logic to maximise DRYness. There are several other ways this could be implemented, however.I added tests for the new view and moved a test which was more relevant to this functionality from the refresh view tests.
Suggestions for improvements welcome! If the serializer implementation is ok, it could probably use some unit tests.