Skip to content

Allow database-configured redirect_uri to be a URL prefix #38

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

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

Conversation

ejucovy
Copy link

@ejucovy ejucovy commented Aug 28, 2013

Currently, if the consumer provides a redirect_uri parameter, its value must be an exact match to the configured redirect_uri in the Client table.

Some oauth consumers expect to receive a response at an unspecified path beneath a certain domain or domain+base path. It would be useful to allow the configured redirect_uri to specify the base URL that must be matched, without requiring an exact match.

This patch adds a new configurable setting, OAUTH_REDIRECT_URI_ENFORCED_PREFIX_ONLY. If it is set to True, then redirect_uri validation only enforces that the client's redirect_uri parameter starts with the value of Client.redirect_uri, rather than checking that they are identical.

By default this setting is False so the current behavior is unchanged by default.

joestump pushed a commit to sprintly/django-oauth2-provider that referenced this pull request Jan 18, 2017
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.

1 participant