Skip to content
Snippets Groups Projects
Commit fdb4e7e0 authored by Stefano Alberto Russo's avatar Stefano Alberto Russo
Browse files

Added automatic redirect to OIDC if local auth disabled.

parent 113dc850
No related branches found
No related tags found
No related merge requests found
......@@ -47,10 +47,9 @@ def login_view(request):
response.delete_cookie('post_login_redirect')
return response
else:
# If local auth disabled, just render login page
# (will be rendered an open id connect url only)
# If local auth disabled, just redirect to OIDC
if settings.DISABLE_LOCAL_AUTH:
return render(request, 'login.html', {'data': data})
return HttpResponseRedirect('/oidc/authenticate/')
# If unauthenticated user tries to log in
if request.method == 'POST':
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment