caffeinehit/django-oauth2-provider — pull request #38 by ejucovy (2013-08-28 13:23:34+00:00)
Title: Allow database-configured redirect_uri to be a URL prefix

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.