mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-06 12:05:03 -04:00
SAML: Allow specifying the IdP entityid to use. (#8630)
If the SAML metadata includes multiple IdPs it is necessary to specify which IdP to redirect users to for authentication.
This commit is contained in:
parent
950bb0305f
commit
53a6f5ddf0
4 changed files with 21 additions and 1 deletions
|
@ -58,6 +58,7 @@ class SamlHandler(BaseHandler):
|
|||
def __init__(self, hs: "synapse.server.HomeServer"):
|
||||
super().__init__(hs)
|
||||
self._saml_client = Saml2Client(hs.config.saml2_sp_config)
|
||||
self._saml_idp_entityid = hs.config.saml2_idp_entityid
|
||||
self._auth_handler = hs.get_auth_handler()
|
||||
self._registration_handler = hs.get_registration_handler()
|
||||
|
||||
|
@ -100,7 +101,7 @@ class SamlHandler(BaseHandler):
|
|||
URL to redirect to
|
||||
"""
|
||||
reqid, info = self._saml_client.prepare_for_authenticate(
|
||||
relay_state=client_redirect_url
|
||||
entityid=self._saml_idp_entityid, relay_state=client_redirect_url
|
||||
)
|
||||
|
||||
# Since SAML sessions timeout it is useful to log when they were created.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue