From 2c913fcf94c3c822c0efe28fd389732368ef4410 Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Mon, 9 Dec 2019 17:57:59 +0000 Subject: [PATCH] Update module name to be moz flavoured --- README.md | 9 ++++++--- saml_mapping_provider.py | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d656798..075d663 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Matrix trial run. This plugin can be installed via [PyPi](https://pypi.org): ``` -pip install matrix-synapse-saml-moz +pip install matrix-synapse-saml-mozilla ``` ## Usage @@ -19,13 +19,16 @@ Add the following in your Synapse config: ```yaml saml2_config: - user_mapping_provider: "saml_mapping_provider.SamlMappingProvider" + user_mapping_provider: + module: "saml_mapping_provider.MozillaSamlMappingProvider" + config: + mxid_source_attribute: "uid" ``` ### Configuration Options Synapse allows SAML mapping providers to specify custom configuration through the -`saml2_config.user_mapping_provider_config` option. +`saml2_config.user_mapping_provider.config` option. The options supported by this provider are currently: diff --git a/saml_mapping_provider.py b/saml_mapping_provider.py index ac1dbed..b03f7c0 100644 --- a/saml_mapping_provider.py +++ b/saml_mapping_provider.py @@ -27,7 +27,7 @@ class SamlConfig(object): mxid_source_attribute = attr.ib() -class SamlMappingProvider(object): +class MozillaSamlMappingProvider(object): def __init__(self, parsed_config: SamlConfig): """A Mozilla-flavoured, Synapse user mapping provider