Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass user into Client.validate_scopes() #384

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

aparamon
Copy link

This extends Client.validate_scopes() to additionally take request argument (and, essentially, request.user) so both scopes and user are available in validation/authorization logic.

@lepture
Copy link
Owner

lepture commented Dec 15, 2018

The problem is that it is not compatible with old API.

@aparamon
Copy link
Author

aparamon commented Dec 15, 2018

@lepture Thanks for the review! What if introduce something like
Client.validate_request_scopes(self, request, scopes, *args, **kwargs)
taking precedence over validate_scopes if present?

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.

2 participants