From a76480be48417d74301fde5a11bf701f1050abca Mon Sep 17 00:00:00 2001 From: lafleur Date: Sat, 10 May 2025 21:11:12 +0200 Subject: [PATCH] oidc: small cosmetics + typos --- src/api/client/oidc/discovery.rs | 7 ++++--- src/core/config/check.rs | 2 +- src/core/config/mod.rs | 1 + 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/api/client/oidc/discovery.rs b/src/api/client/oidc/discovery.rs index f21bc23c..e4c49b65 100644 --- a/src/api/client/oidc/discovery.rs +++ b/src/api/client/oidc/discovery.rs @@ -9,7 +9,7 @@ use ruma::{ self, msc2965::{ AccountManagementAction, AuthorizationServerMetadata, CodeChallengeMethod, - GrantType, Prompt, Response, ResponseMode, ResponseType, + GrantType, Prompt, ResponseMode, ResponseType, }, }, error::{ @@ -28,8 +28,8 @@ use crate::{Ruma, RumaResponse, conduwuit::Error}; /// with 404/M_UNRECOGNIZED. pub(crate) async fn get_auth_metadata( State(services): State, - _body: Ruma, -) -> Result> { + _body: Ruma, +) -> Result> { let unrecognized_error = Err(Error::Ruma(ClientError::new( http::StatusCode::NOT_FOUND, ClientErrorBody::Standard { @@ -52,6 +52,7 @@ pub(crate) async fn get_auth_metadata( .unwrap(), ); + // Build up metadata with primitives from ruma::api::client::msc2965. let metadata = AuthorizationServerMetadata { issuer: issuer.clone(), authorization_endpoint: issuer diff --git a/src/core/config/check.rs b/src/core/config/check.rs index 267325a0..a5ea747c 100644 --- a/src/core/config/check.rs +++ b/src/core/config/check.rs @@ -275,7 +275,7 @@ pub fn check(config: &Config) -> Result { if auth.enable_oidc_login && config.well_known.client.is_none() { return Err!(Config( "auth.enable_oidc_login", - "Oidc authentication is enabled but the well-known client is not set." + "OIDC authentication is enabled but the well-known client is not set." )); } } diff --git a/src/core/config/mod.rs b/src/core/config/mod.rs index 06723070..1f92f320 100644 --- a/src/core/config/mod.rs +++ b/src/core/config/mod.rs @@ -103,6 +103,7 @@ pub struct Config { #[serde(default)] pub tls: TlsConfig, + // external structure; separate section pub auth: Option, /// The UNIX socket conduwuit will listen on.