Skip to content

Conversation

@WaleedMeselhy
Copy link

pass new argument (extra_info_for_claims) to the function that generate claims to add this argument to claims

@pep8speaks
Copy link

Hello @WaleedMeselhy! Thanks for submitting the PR.

Line 446:91: E501 line too long (104 > 90 characters)

Line 113:91: E501 line too long (93 > 90 characters)
Line 136:91: E501 line too long (98 > 90 characters)
Line 157:91: E501 line too long (92 > 90 characters)

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 1144f33 on WaleedMeselhy:master into 8ba49aa on vimalloc:master.

@vimalloc
Copy link
Owner

This isn't a bad idea, if I was rebuilding the library from scratch or introducing a new major version bump I could totally see adding this into the extension. As it stands though I don't think I want to merge this, it creates a breaking change in this extension which I think will cause more issues then it solves. You can put logic for when additional claims are needed directly in the user claims callback instead, and achieve functionally the same thing without having a breaking change in this library.

If you need additional state besides your user model to determine if additional claims are required, you can use the flask.g object to store them before the callback is hit, and access them in your callback function.

@vimalloc vimalloc closed this Jan 20, 2019
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.

4 participants