Implement OpenID Connect-based login (#7256)

This commit is contained in:
Quentin Gliech 2020-05-08 14:30:40 +02:00 committed by GitHub
parent a4a5ec4096
commit 616af44137
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 2163 additions and 12 deletions

View file

@ -36,17 +36,13 @@ class SSOConfig(Config):
if not template_dir:
template_dir = pkg_resources.resource_filename("synapse", "res/templates",)
self.sso_redirect_confirm_template_dir = template_dir
self.sso_template_dir = template_dir
self.sso_account_deactivated_template = self.read_file(
os.path.join(
self.sso_redirect_confirm_template_dir, "sso_account_deactivated.html"
),
os.path.join(self.sso_template_dir, "sso_account_deactivated.html"),
"sso_account_deactivated_template",
)
self.sso_auth_success_template = self.read_file(
os.path.join(
self.sso_redirect_confirm_template_dir, "sso_auth_success.html"
),
os.path.join(self.sso_template_dir, "sso_auth_success.html"),
"sso_auth_success_template",
)
@ -137,6 +133,13 @@ class SSOConfig(Config):
#
# This template has no additional variables.
#
# * HTML page to display to users if something goes wrong during the
# OpenID Connect authentication process: 'sso_error.html'.
#
# When rendering, this template is given two variables:
# * error: the technical name of the error
# * error_description: a human-readable message for the error
#
# You can see the default templates at:
# https://github.com/matrix-org/synapse/tree/master/synapse/res/templates
#