auth: Add support for Azure Active Directory authentication.

This takes advantage of all of our work on making the
python-social-auth integration reusable for other authentication
backends.
This commit is contained in:
seresheim
2018-10-05 14:32:02 +02:00
committed by Tim Abbott
parent 9d058f9193
commit 49dbd85a89
10 changed files with 72 additions and 1 deletions

View File

@@ -319,6 +319,7 @@ def start_social_login(request: HttpRequest, backend: str) -> HttpResponse:
if (backend == "github") and not (settings.SOCIAL_AUTH_GITHUB_KEY and
settings.SOCIAL_AUTH_GITHUB_SECRET):
return redirect_to_config_error("github")
# TODO: Add a similar block of AzureAD.
return oauth_redirect_to_root(request, backend_url, 'social')