From 29ae04af3b0867642ebae9fa0c2534d4a6c0c975 Mon Sep 17 00:00:00 2001 From: Brendan Abolivier Date: Tue, 9 Feb 2021 17:50:25 +0100 Subject: Remove unneeded type constraints on 3rd party protocol lookup responses --- changelog.d/9361.bugfix | 1 + synapse/appservice/api.py | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) create mode 100644 changelog.d/9361.bugfix diff --git a/changelog.d/9361.bugfix b/changelog.d/9361.bugfix new file mode 100644 index 0000000000..4d0477f033 --- /dev/null +++ b/changelog.d/9361.bugfix @@ -0,0 +1 @@ +Fix a bug causing Synapse to impose the wrong type constraints on fields when processing responses from appservices to `/_matrix/app/v1/thirdparty/user/{protocol}`. diff --git a/synapse/appservice/api.py b/synapse/appservice/api.py index e366a982b8..11aee50f7a 100644 --- a/synapse/appservice/api.py +++ b/synapse/appservice/api.py @@ -76,9 +76,6 @@ def _is_valid_3pe_result(r, field): fields = r["fields"] if not isinstance(fields, dict): return False - for k in fields.keys(): - if not isinstance(fields[k], str): - return False return True -- cgit 1.5.1 From 5f716fa7771a567eb2e64a635e9f1a7eea7b9640 Mon Sep 17 00:00:00 2001 From: Thomas Mortagne Date: Tue, 9 Feb 2021 17:54:52 +0100 Subject: Add XWiki OIDC provider example. (#9324) --- docs/openid.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/docs/openid.md b/docs/openid.md index 9d19368845..0be79591b1 100644 --- a/docs/openid.md +++ b/docs/openid.md @@ -388,3 +388,25 @@ oidc_providers: localpart_template: "{{ user.login }}" display_name_template: "{{ user.full_name }}" ``` + +### XWiki + +Install [OpenID Connect Provider](https://extensions.xwiki.org/xwiki/bin/view/Extension/OpenID%20Connect/OpenID%20Connect%20Provider/) extension in your [XWiki](https://www.xwiki.org) instance. + +Synapse config: + +```yaml +oidc_providers: + - idp_id: xwiki + idp_name: "XWiki" + issuer: "https://myxwikihost/xwiki/oidc/" + client_id: "your-client-id" # TO BE FILLED + # Needed until https://github.com/matrix-org/synapse/issues/9212 is fixed + client_secret: "dontcare" + scopes: ["openid", "profile"] + user_profile_method: "userinfo_endpoint" + user_mapping_provider: + config: + localpart_template: "{{ user.preferred_username }}" + display_name_template: "{{ user.name }}" +``` -- cgit 1.5.1