Add support for included credentials in webhook targets.
Review Request #8916 - Created April 27, 2017 and updated
Sometimes, a user may need to dispatch a webhook to an authenticated endpoint.
Django (somewhat sensibly) does not allow inline credentials in
in forms and models, but in this case we want to allow it.
This change adds a new validator that works like Django's
includes the credentials within the regex. The URL is then split and
credentials (if included) are pulled out and added to a
for the url open.
- Verified that I was able to save webhook targets that included credentials
in the URL.
- Checked that things that definitely weren't URLs were still rejected.
- Ran unit tests.
Revision 2 (+85 -20)