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. # Read the request.
try: try:
self._extract_saml_request() self._extract_saml_request()
except KeyError as exc: except KeyError:
raise CannotHandleAssertion( raise CannotHandleAssertion(f"Couldn't find SAML request in user session:")
f"can't find SAML request in user session: {exc}"
) from exc
try: try:
self._decode_and_parse_request() self._decode_and_parse_request()
except Exception as exc: 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() self._validate_request()
return True 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 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. # this is required as the process view which it redirects to might have to login first.
path( path(
"<slug:application>/login/", views.LoginProcessView.as_view(), name="saml-login" "<slug:application>/login/", views.LoginBeginView.as_view(), name="saml-login"
), ),
path( path(
"<slug:application>/login/process/", "<slug:application>/login/process/",