Skip to content

Conversation

@roubaeli
Copy link

@roubaeli roubaeli commented Jun 1, 2018

Took a stab at #100 to optionally include user claims in refresh tokens. Feedback will be greatly appreciated but please note that I won't be available to make changes/fixes until Monday.

@coveralls
Copy link

coveralls commented Jun 1, 2018

Coverage Status

Coverage remained the same at 100.0% when pulling 664f8b4 on roubaeli:master into 02c9fc6 on vimalloc:master.

@vimalloc
Copy link
Owner

vimalloc commented Jun 1, 2018

This looks great, thanks for putting this together.

One small thing, could you add a unit test for the case where JWT_CLAIMS_IN_REFRESH_TOKEN is false and there is a @jwt.user_claims_loader function, to verify that the claims are not present in the refresh token in that case?

Thanks for contributing! 👍

@roubaeli
Copy link
Author

roubaeli commented Jun 2, 2018

Thanks! That's exactly what I was thinking but I wasn't sure how to go for it without creating another fixture so I wanted to ask first if that's OK? :-)

@vimalloc
Copy link
Owner

vimalloc commented Jun 3, 2018

I think you can get around having a whole new fixture by setting the app.config in the unit test itself (like this: https://github.com/vimalloc/flask-jwt-extended/blob/master/tests/test_headers.py#L23), but if that doesn't work for any reason feel free to make a new fixture 👍

@roubaeli
Copy link
Author

roubaeli commented Jun 4, 2018

Worked perfectly...I squashed new test with the previous commit so the history is clean :-) Thank you for your help!

@vimalloc vimalloc merged commit 19c5720 into vimalloc:master Jun 5, 2018
@vimalloc
Copy link
Owner

vimalloc commented Jun 5, 2018

Awesome, thanks! I'll push a new version with these changes. Thanks for contributing! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants