From 3d004b1923ff83343104534abcd320c670632743 Mon Sep 17 00:00:00 2001 From: Ginger Date: Tue, 30 Jun 2026 21:22:06 -0400 Subject: [PATCH] fix: Adjust OIDC config section comment position --- conduwuit-example.toml | 8 ++++---- src/core/config/mod.rs | 8 ++++---- src/macros/config.rs | 5 +++++ 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/conduwuit-example.toml b/conduwuit-example.toml index 5521acde4..9669ecbb3 100644 --- a/conduwuit-example.toml +++ b/conduwuit-example.toml @@ -2032,6 +2032,8 @@ # This item is undocumented. Please contribute documentation for it. # #oidc = + +#[global.oauth.oidc] # Uncommenting this section will enable Continuwuity's support for # authenticating users using an OpenID Connect-compatible identity provider. # This is referred to as "delegated authentication". @@ -2040,8 +2042,6 @@ # the `global.oauth.compatibility_mode` setting is set to `exclusive`. # Matrix clients which do not support OAuth login (also referred to as "next-gen auth") will NOT be able # to log in while delegated authentication is active. -#[global.oauth.oidc] - # The OIDC issuer URL. Continuwuity will use OpenID Connect Discovery to # automatically fetch the identity provider's metadata from this URL. # Generally you should set this to the base domain your identity provider @@ -2090,7 +2090,7 @@ # - "on_registration": Listed keys will be imported once, when the user # registers. # - "on_login": Listed keys will be imported every time the user logs in. -# Additionally, users will not be able to manually edit the keys through -# their Matrix client. +# Additionally, users will not be able to manually edit any listed keys +# through their Matrix client. # #profile_key_import_mode = "on_registration" diff --git a/src/core/config/mod.rs b/src/core/config/mod.rs index 3a28ddabb..d940b52d7 100644 --- a/src/core/config/mod.rs +++ b/src/core/config/mod.rs @@ -2459,7 +2459,7 @@ impl OAuthMode { filename = "conduwuit-example.toml", section = "global.oauth.oidc", optional = "true", - header = "\ + subheader = "\ # Uncommenting this section will enable Continuwuity's support for # authenticating users using an OpenID Connect-compatible identity provider. # This is referred to as \"delegated authentication\". @@ -2467,7 +2467,7 @@ impl OAuthMode { # IMPORTANT NOTE: When delegated authentication is active, Continuwuity will behave as if # the `global.oauth.compatibility_mode` setting is set to `exclusive`. # Matrix clients which do not support OAuth login (also referred to as \"next-gen auth\") will \ - NOT be able + NOT be able # to log in while delegated authentication is active." )] pub struct OidcConfig { @@ -2522,8 +2522,8 @@ pub struct OidcConfig { /// - "on_registration": Listed keys will be imported once, when the user /// registers. /// - "on_login": Listed keys will be imported every time the user logs in. - /// Additionally, users will not be able to manually edit the keys through - /// their Matrix client. + /// Additionally, users will not be able to manually edit any listed keys + /// through their Matrix client. /// /// default: "on_registration" #[serde(default)] diff --git a/src/macros/config.rs b/src/macros/config.rs index b0b42eddd..1f8285074 100644 --- a/src/macros/config.rs +++ b/src/macros/config.rs @@ -81,6 +81,11 @@ fn generate_example(input: &ItemStruct, args: &[Meta], write: bool) -> Result = Vec::new();