From cd398ffa0a9df05157cdae3971c896169b9d2ad7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89loi=20Rivard?= Date: Wed, 20 Nov 2024 14:19:25 +0100 Subject: [PATCH] chore: use the .example domain in placeholders --- canaille/backends/ldap/backend.py | 4 ++-- canaille/config.sample.toml | 8 ++++---- canaille/oidc/endpoints/forms.py | 14 +++++++------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/canaille/backends/ldap/backend.py b/canaille/backends/ldap/backend.py index d96262cd..3656db51 100644 --- a/canaille/backends/ldap/backend.py +++ b/canaille/backends/ldap/backend.py @@ -126,7 +126,7 @@ class LDAPBackend(Backend): formatted_name=f"canaille_{uuid.uuid4()}", family_name=f"canaille_{uuid.uuid4()}", user_name=f"canaille_{uuid.uuid4()}", - emails=f"canaille_{uuid.uuid4()}@mydomain.tld", + emails=f"canaille_{uuid.uuid4()}@mydomain.example", password="correct horse battery staple", ) Backend.instance.save(user) @@ -145,7 +145,7 @@ class LDAPBackend(Backend): cn=f"canaille_{uuid.uuid4()}", family_name=f"canaille_{uuid.uuid4()}", user_name=f"canaille_{uuid.uuid4()}", - emails=f"canaille_{uuid.uuid4()}@mydomain.tld", + emails=f"canaille_{uuid.uuid4()}@mydomain.example", password="correct horse battery staple", ) Backend.instance.save(user) diff --git a/canaille/config.sample.toml b/canaille/config.sample.toml index 228db429..bca3d6a5 100644 --- a/canaille/config.sample.toml +++ b/canaille/config.sample.toml @@ -2,7 +2,7 @@ SECRET_KEY = "change me before you go in production" # The interface on which canaille will be served -# SERVER_NAME = "auth.mydomain.tld" +# SERVER_NAME = "auth.mydomain.example" # PREFERRED_URL_SCHEME = "https" [CANAILLE] @@ -88,7 +88,7 @@ SECRET_KEY = "change me before you go in production" # In certain special cases (example : questioning about password # corruption), it is necessary to provide an administration contact # email. -# ADMIN_EMAIL = "admin@mydomain.tld" +# ADMIN_EMAIL = "admin@mydomain.example" # If :py:data:`True`, Canaille will check for password compromise on HIBP # every time a new password is register. @@ -238,7 +238,7 @@ WRITE = [ # PRIVATE_KEY = "..." # PUBLIC_KEY = "..." # The URI of the identity provider -# ISS = "https://auth.mydomain.tld" +# ISS = "https://auth.mydomain.example" # The key type parameter # KTY = "RSA" # The key algorithm @@ -272,4 +272,4 @@ WRITE = [ # SSL = false # LOGIN = "" # PASSWORD = "" -# FROM_ADDR = "admin@mydomain.tld" +# FROM_ADDR = "admin@mydomain.example" diff --git a/canaille/oidc/endpoints/forms.py b/canaille/oidc/endpoints/forms.py index fa2154f5..1d78fa9c 100644 --- a/canaille/oidc/endpoints/forms.py +++ b/canaille/oidc/endpoints/forms.py @@ -34,7 +34,7 @@ class ClientAddForm(Form): wtforms.EmailField( _("Contacts"), validators=[wtforms.validators.Optional(), email_validator], - render_kw={"placeholder": "admin@mydomain.tld"}, + render_kw={"placeholder": "admin@mydomain.example"}, ), min_entries=1, validators=[unique_values], @@ -45,7 +45,7 @@ class ClientAddForm(Form): wtforms.validators.DataRequired(), is_uri, ], - render_kw={"placeholder": "https://mydomain.tld"}, + render_kw={"placeholder": "https://mydomain.example"}, ) redirect_uris = wtforms.FieldList( wtforms.URLField( @@ -54,7 +54,7 @@ class ClientAddForm(Form): wtforms.validators.DataRequired(), is_uri, ], - render_kw={"placeholder": "https://mydomain.tld/callback"}, + render_kw={"placeholder": "https://mydomain.example/callback"}, ), min_entries=1, validators=[unique_values], @@ -67,7 +67,7 @@ class ClientAddForm(Form): is_uri, ], render_kw={ - "placeholder": "https://mydomain.tld/you-have-been-disconnected" + "placeholder": "https://mydomain.example/you-have-been-disconnected" }, ), min_entries=1, @@ -120,7 +120,7 @@ class ClientAddForm(Form): wtforms.validators.Optional(), is_uri, ], - render_kw={"placeholder": "https://mydomain.tld/logo.png"}, + render_kw={"placeholder": "https://mydomain.example/logo.png"}, ) tos_uri = wtforms.URLField( _("Terms of service URI"), @@ -128,7 +128,7 @@ class ClientAddForm(Form): wtforms.validators.Optional(), is_uri, ], - render_kw={"placeholder": "https://mydomain.tld/tos.html"}, + render_kw={"placeholder": "https://mydomain.example/tos.html"}, ) policy_uri = wtforms.URLField( _("Policy URI"), @@ -136,7 +136,7 @@ class ClientAddForm(Form): wtforms.validators.Optional(), is_uri, ], - render_kw={"placeholder": "https://mydomain.tld/policy.html"}, + render_kw={"placeholder": "https://mydomain.example/policy.html"}, ) software_id = wtforms.StringField( _("Software ID"),