mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-07 22:14:57 -04:00
Small tweaks to SAML2 configuration.
- Add saml2 config docs to default config. - Use existence of saml2 config to indicate if saml2 should be enabled.
This commit is contained in:
parent
a887efa07a
commit
f3049d0b81
2 changed files with 34 additions and 22 deletions
|
@ -38,8 +38,8 @@ class LoginRestServlet(ClientV1RestServlet):
|
|||
|
||||
def __init__(self, hs):
|
||||
super(LoginRestServlet, self).__init__(hs)
|
||||
self.idp_redirect_url = hs.config.saml2_config['idp_redirect_url']
|
||||
self.saml2_enabled = hs.config.saml2_config['enabled']
|
||||
self.idp_redirect_url = hs.config.saml2_idp_redirect_url
|
||||
self.saml2_enabled = hs.config.saml2_enabled
|
||||
|
||||
def on_GET(self, request):
|
||||
flows = [{"type": LoginRestServlet.PASS_TYPE}]
|
||||
|
@ -127,7 +127,7 @@ class SAML2RestServlet(ClientV1RestServlet):
|
|||
|
||||
def __init__(self, hs):
|
||||
super(SAML2RestServlet, self).__init__(hs)
|
||||
self.sp_config = hs.config.saml2_config['config_path']
|
||||
self.sp_config = hs.config.saml2_config_path
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def on_POST(self, request):
|
||||
|
@ -177,6 +177,6 @@ def _parse_json(request):
|
|||
|
||||
def register_servlets(hs, http_server):
|
||||
LoginRestServlet(hs).register(http_server)
|
||||
if hs.config.saml2_config['enabled']:
|
||||
if hs.config.saml2_enabled:
|
||||
SAML2RestServlet(hs).register(http_server)
|
||||
# TODO PasswordResetRestServlet(hs).register(http_server)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue