Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Fix escaping of braces in OIDC sample config. (#9317)
Browse files Browse the repository at this point in the history
This fixes the Jinja2 templates for the mapping provider.
  • Loading branch information
clokep authored and Half-Shot committed Feb 17, 2021
1 parent 743325a commit 45ab242
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
1 change: 1 addition & 0 deletions changelog.d/9317.doc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix the braces in the `oidc_providers` section of the sample config.
10 changes: 5 additions & 5 deletions docs/sample_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1870,9 +1870,9 @@ oidc_providers:
# user_mapping_provider:
# config:
# subject_claim: "id"
# localpart_template: "{ user.login }"
# display_name_template: "{ user.name }"
# email_template: "{ user.email }"
# localpart_template: "{{ user.login }}"
# display_name_template: "{{ user.name }}"
# email_template: "{{ user.email }}"

# For use with Keycloak
#
Expand All @@ -1899,8 +1899,8 @@ oidc_providers:
# user_mapping_provider:
# config:
# subject_claim: "id"
# localpart_template: "{ user.login }"
# display_name_template: "{ user.name }"
# localpart_template: "{{ user.login }}"
# display_name_template: "{{ user.name }}"


# Enable Central Authentication Service (CAS) for registration and login.
Expand Down
10 changes: 5 additions & 5 deletions synapse/config/oidc_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,9 @@ def generate_config_section(self, config_dir_path, server_name, **kwargs):
# user_mapping_provider:
# config:
# subject_claim: "id"
# localpart_template: "{{ user.login }}"
# display_name_template: "{{ user.name }}"
# email_template: "{{ user.email }}"
# localpart_template: "{{{{ user.login }}}}"
# display_name_template: "{{{{ user.name }}}}"
# email_template: "{{{{ user.email }}}}"
# For use with Keycloak
#
Expand All @@ -230,8 +230,8 @@ def generate_config_section(self, config_dir_path, server_name, **kwargs):
# user_mapping_provider:
# config:
# subject_claim: "id"
# localpart_template: "{{ user.login }}"
# display_name_template: "{{ user.name }}"
# localpart_template: "{{{{ user.login }}}}"
# display_name_template: "{{{{ user.name }}}}"
""".format(
mapping_provider=DEFAULT_USER_MAPPING_PROVIDER
)
Expand Down

0 comments on commit 45ab242

Please sign in to comment.