diff options
author | Richard van der Hoff <richard@matrix.org> | 2019-06-26 22:52:02 +0100 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2019-06-26 22:52:02 +0100 |
commit | 370532210307822eb90dc656449b23df7c6c0dd8 (patch) | |
tree | 9d6d316ac8a730ffa5a1a45e02b3bbcf38315eee /synapse/rest/client/v1/login.py | |
parent | Revert redundant changes to static js (diff) | |
download | synapse-370532210307822eb90dc656449b23df7c6c0dd8.tar.xz |
Move all the saml stuff out to a centralised handler
Diffstat (limited to 'synapse/rest/client/v1/login.py')
-rw-r--r-- | synapse/rest/client/v1/login.py | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/synapse/rest/client/v1/login.py b/synapse/rest/client/v1/login.py index a31d277935..b59aa3d5c9 100644 --- a/synapse/rest/client/v1/login.py +++ b/synapse/rest/client/v1/login.py @@ -487,19 +487,10 @@ class SAMLRedirectServlet(BaseSsoRedirectServlet): PATTERNS = client_patterns("/login/sso/redirect", v1=True) def __init__(self, hs): - self._saml_client = hs.get_saml_client() + self._saml_handler = hs.get_saml_handler() def get_sso_url(self, client_redirect_url): - reqid, info = self._saml_client.prepare_for_authenticate( - relay_state=client_redirect_url - ) - - for key, value in info["headers"]: - if key == "Location": - return value - - # this shouldn't happen! - raise Exception("prepare_for_authenticate didn't return a Location header") + return self._saml_handler.handle_redirect_request(client_redirect_url) class SSOAuthHandler(object): |