providers/saml: fix /login/ pointing to wrong view

This commit is contained in:
Jens Langhammer 2020-02-20 16:13:55 +01:00
parent 36b1f8ba36
commit 8d875cb01d
2 changed files with 4 additions and 6 deletions

View File

@ -183,15 +183,13 @@ class Processor:
# Read the request.
try:
self._extract_saml_request()
except KeyError as exc:
raise CannotHandleAssertion(
f"can't find SAML request in user session: {exc}"
) from exc
except KeyError:
raise CannotHandleAssertion(f"Couldn't find SAML request in user session:")
try:
self._decode_and_parse_request()
except Exception as exc:
raise CannotHandleAssertion(f"can't parse SAML request: {exc}") from exc
raise CannotHandleAssertion(f"Couldn't parse SAML request: {exc}") from exc
self._validate_request()
return True

View File

@ -13,7 +13,7 @@ urlpatterns = [
# This view is the endpoint a SP would redirect to, and saves data into the session
# this is required as the process view which it redirects to might have to login first.
path(
"<slug:application>/login/", views.LoginProcessView.as_view(), name="saml-login"
"<slug:application>/login/", views.LoginBeginView.as_view(), name="saml-login"
),
path(
"<slug:application>/login/process/",