diff --git a/passbook/providers/saml/processors/base.py b/passbook/providers/saml/processors/base.py index c407d44d0..4c660a17b 100644 --- a/passbook/providers/saml/processors/base.py +++ b/passbook/providers/saml/processors/base.py @@ -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 diff --git a/passbook/providers/saml/urls.py b/passbook/providers/saml/urls.py index c48edc1df..bddf07571 100644 --- a/passbook/providers/saml/urls.py +++ b/passbook/providers/saml/urls.py @@ -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( - "/login/", views.LoginProcessView.as_view(), name="saml-login" + "/login/", views.LoginBeginView.as_view(), name="saml-login" ), path( "/login/process/",