feat: Add support for reading the OIDC client secret from a file

This commit is contained in:
Ginger committed 2026-07-02 16:34:56 -04:00
1 parent 910925b906
commit 45809b7970
4 files changed
+43 -8

No files matched your search

+9
View File
@@ -289,6 +289,15 @@ pub fn check(config: &Config) -> Result {
| _ => (),
}
if let Some(oidc) = &config.oauth.oidc
&& oidc.client_secret.is_none()
&& oidc.client_secret_file.is_none()
{
return Err!(
"Either `client_secret` or `client_secret_file` must be set if OIDC is configured."
);
}
Ok(())
}
+7 -1
View File
@@ -2484,7 +2484,13 @@ pub struct OidcConfig {
/// The OAuth client secret for Continuwuity to use when communicating with
/// the identity provider.
pub client_secret: ClientSecret,
pub client_secret: Option<ClientSecret>,
/// A path to a file which Continuwuity will read the client secret from.
/// If this option is set, it will override `client_secret`.
///
/// The server will fail to start if the file cannot be read.
pub client_secret_file: Option<PathBuf>,
/// Additional scopes Continuwuity should request from the IDP. This may be
/// necessary to access certain claims. Continuwuity always requests the