-
- Downloads
Implement a username picker for synapse (#8942)
The final part (for now) of my work to implement a username picker in synapse itself. The idea is that we allow `UsernameMappingProvider`s to return `localpart=None`, in which case, rather than redirecting the browser back to the client, we redirect to a username-picker resource, which allows the user to enter a username. We *then* complete the SSO flow (including doing the client permission checks). The static resources for the username picker itself (in https://github.com/matrix-org/synapse/tree/rav/username_picker/synapse/res/username_picker) are essentially lifted wholesale from https://github.com/matrix-org/matrix-synapse-saml-mozilla/tree/master/matrix_synapse_saml_mozilla/res. As the comment says, we might want to think about making them customisable, but that can be a follow-up. Fixes #8876.
Showing
- changelog.d/8942.feature 1 addition, 0 deletionschangelog.d/8942.feature
- docs/sample_config.yaml 3 additions, 2 deletionsdocs/sample_config.yaml
- docs/sso_mapping_providers.md 18 additions, 10 deletionsdocs/sso_mapping_providers.md
- synapse/app/homeserver.py 2 additions, 0 deletionssynapse/app/homeserver.py
- synapse/config/oidc_config.py 3 additions, 2 deletionssynapse/config/oidc_config.py
- synapse/handlers/oidc_handler.py 27 additions, 32 deletionssynapse/handlers/oidc_handler.py
- synapse/handlers/sso.py 246 additions, 8 deletionssynapse/handlers/sso.py
- synapse/res/username_picker/index.html 19 additions, 0 deletionssynapse/res/username_picker/index.html
- synapse/res/username_picker/script.js 95 additions, 0 deletionssynapse/res/username_picker/script.js
- synapse/res/username_picker/style.css 27 additions, 0 deletionssynapse/res/username_picker/style.css
- synapse/rest/synapse/client/pick_username.py 88 additions, 0 deletionssynapse/rest/synapse/client/pick_username.py
- synapse/types.py 5 additions, 3 deletionssynapse/types.py
- tests/handlers/test_oidc.py 142 additions, 1 deletiontests/handlers/test_oidc.py
- tests/unittest.py 7 additions, 1 deletiontests/unittest.py
Loading
Please register or sign in to comment