Redirect to login screen if GET on samlValidate

This commit is contained in:
Valentin Samir 2015-05-22 19:39:51 +02:00
parent f71bd22954
commit c16bb2d7f0

View file

@ -252,3 +252,5 @@ def samlValidate(request):
return render(request, "cas_server/samlValidateError.xml", {'code':'VersionMismatch'}, content_type="text/xml; charset=utf-8") return render(request, "cas_server/samlValidateError.xml", {'code':'VersionMismatch'}, content_type="text/xml; charset=utf-8")
except models.ServiceTicket.DoesNotExist: except models.ServiceTicket.DoesNotExist:
return render(request, "cas_server/samlValidateError.xml", {'code':'AuthnFailed'}, content_type="text/xml; charset=utf-8") return render(request, "cas_server/samlValidateError.xml", {'code':'AuthnFailed'}, content_type="text/xml; charset=utf-8")
else:
return redirect("login")