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 Feb 4, 2021
1 parent 2814028 commit 2ab6e67
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 @@ -1872,9 +1872,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 @@ -1901,8 +1901,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 @@ -198,9 +198,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 @@ -227,8 +227,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 2ab6e67

Please sign in to comment.