You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
Richard van der Hoff 7d346c8106 remove test dependency on xmlsec
Stub things out so that we don't have to have xmlsec installed to run the tests
5 years ago
doc Allow users to pick a username on login (#1) 5 years ago
matrix_synapse_saml_mozilla fix lint 5 years ago
tests remove test dependency on xmlsec 5 years ago
.gitignore update gitignore 5 years ago
LICENSE Initial commit 5 years ago
README.md fix link for login flow 5 years ago
setup.cfg Allow users to pick a username on login (#1) 5 years ago
setup.py switch to setuptools_scm 5 years ago
tox.ini bump to dev release of synapse 5 years ago

README.md

Synapse Mozilla SAML MXID Mapper

A Synapse plugin module which allows users to choose their username when they first log in.

Installation

This plugin can be installed via PyPi:

pip install matrix-synapse-saml-mozilla

Config

Add the following in your Synapse config:

   saml2_config:
     user_mapping_provider:
       module: "matrix_synapse_saml_mozilla.SamlMappingProvider"

Also, under the HTTP client listener, configure an additional_resource as per the below:

listeners:
  - port: <port>
    type: http

    resources:
      - names: [client]

    additional_resources:
      "/_matrix/saml2/pick_username":
        module: "matrix_synapse_saml_mozilla.pick_username_resource"

Configuration Options

Synapse allows SAML mapping providers to specify custom configuration through the saml2_config.user_mapping_provider.config option.

There are no options currently supported by this provider.

Implementation notes

The login flow looks something like this:

login flow

Development and Testing

This repository uses tox to run linting and tests.

Linting

Code is linted with the flake8 tool. Run tox -e lint to check for linting errors in the codebase.

Tests

This repository uses unittest to run the tests located in the tests directory. They can be ran with tox -e tests.