From 9ef0793b5fcd5e8c44f6ecc2da416994dc1fdc42 Mon Sep 17 00:00:00 2001 From: cmsassot Date: Mon, 3 Oct 2022 16:42:01 +0200 Subject: [PATCH] hydra-saml: config list titre/description/option pour internationalisation --- defaults/main.yml | 5 +++-- templates/hydra-dispatcher-apps.yml.j2 | 11 +++++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index d7064be..22729af 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -110,12 +110,13 @@ hydra_passwordless_attributes_rewrite_rules: # Hydra SAML configuration enable_hydra_saml: yes -hydra_saml_app_title: SAML -hydra_saml_app_description: Authentification via SAML +hydra_saml_app_title: {} +hydra_saml_app_description: {} hydra_saml_app_icon_url: hydra_saml_identity_provider_id: saml hydra_saml_idp_entity_id: https://samltest.id/saml/idp hydra_saml_idp_metadata_url: https://samltest.id/saml/idp +hydra_saml_app_options: {} # Liste des URLs autorisées pour la redirection post-login/logout sur le service shibboleth-sp hydra_saml_allowed_redirects: [] diff --git a/templates/hydra-dispatcher-apps.yml.j2 b/templates/hydra-dispatcher-apps.yml.j2 index 02a2926..bc63b93 100644 --- a/templates/hydra-dispatcher-apps.yml.j2 +++ b/templates/hydra-dispatcher-apps.yml.j2 @@ -16,14 +16,21 @@ hydra: {% if enable_hydra_saml %} - id: {{ hydra_saml_identity_provider_id | default("saml") }} title: - fr: "{{ hydra_saml_app_title }}" + fr: "{{ hydra_saml_app_title.fr }}" + en: "{{ hydra_saml_app_title.en | default("{{ hydra_saml_app_title.fr }}") }}" description: - fr: "{{ hydra_saml_app_description }}" + fr: "{{ hydra_saml_app_description.fr }}" + en: "{{ hydra_saml_app_description.en | default("{{ hydra_saml_app_description.fr }}") }}" login_url: "{{ haproxy_public_base_url }}{{ haproxy_hydra_saml_base_path }}/login" consent_url: "{{ haproxy_public_base_url }}{{ haproxy_hydra_saml_base_path }}/consent" logout_url: "{{ haproxy_public_base_url }}{{ haproxy_hydra_saml_base_path }}/logout" attributes_rewrite_rules: {{ hydra_saml_attributes_rewrite_rules | to_json }} icon_url: "{{ hydra_saml_app_icon_url }}" + options: + icon_url: + fr: "{{ hydra_saml_app_options.icon_url.fr }}" + en: "{{ hydra_saml_app_options.icon_url.en | default("{{ hydra_saml_app_options.icon_url.fr }}") }}" + {% endif %} {% if enable_hydra_oidc %} - id: {{ hydra_oidc_identity_provider_id | default("oidc") }}