mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-06-27 00:56:36 +02:00
oidc: small cosmetics + typos
This commit is contained in:
parent
aa2575be3e
commit
a76480be48
3 changed files with 6 additions and 4 deletions
|
@ -9,7 +9,7 @@ use ruma::{
|
||||||
self,
|
self,
|
||||||
msc2965::{
|
msc2965::{
|
||||||
AccountManagementAction, AuthorizationServerMetadata, CodeChallengeMethod,
|
AccountManagementAction, AuthorizationServerMetadata, CodeChallengeMethod,
|
||||||
GrantType, Prompt, Response, ResponseMode, ResponseType,
|
GrantType, Prompt, ResponseMode, ResponseType,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
error::{
|
error::{
|
||||||
|
@ -28,8 +28,8 @@ use crate::{Ruma, RumaResponse, conduwuit::Error};
|
||||||
/// with 404/M_UNRECOGNIZED.
|
/// with 404/M_UNRECOGNIZED.
|
||||||
pub(crate) async fn get_auth_metadata(
|
pub(crate) async fn get_auth_metadata(
|
||||||
State(services): State<crate::State>,
|
State(services): State<crate::State>,
|
||||||
_body: Ruma<get_authorization_server_metadata::msc2965::Request>,
|
_body: Ruma<msc2965::Request>,
|
||||||
) -> Result<RumaResponse<Response>> {
|
) -> Result<RumaResponse<msc2965::Response>> {
|
||||||
let unrecognized_error = Err(Error::Ruma(ClientError::new(
|
let unrecognized_error = Err(Error::Ruma(ClientError::new(
|
||||||
http::StatusCode::NOT_FOUND,
|
http::StatusCode::NOT_FOUND,
|
||||||
ClientErrorBody::Standard {
|
ClientErrorBody::Standard {
|
||||||
|
@ -52,6 +52,7 @@ pub(crate) async fn get_auth_metadata(
|
||||||
.unwrap(),
|
.unwrap(),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Build up metadata with primitives from ruma::api::client::msc2965.
|
||||||
let metadata = AuthorizationServerMetadata {
|
let metadata = AuthorizationServerMetadata {
|
||||||
issuer: issuer.clone(),
|
issuer: issuer.clone(),
|
||||||
authorization_endpoint: issuer
|
authorization_endpoint: issuer
|
||||||
|
|
|
@ -275,7 +275,7 @@ pub fn check(config: &Config) -> Result {
|
||||||
if auth.enable_oidc_login && config.well_known.client.is_none() {
|
if auth.enable_oidc_login && config.well_known.client.is_none() {
|
||||||
return Err!(Config(
|
return Err!(Config(
|
||||||
"auth.enable_oidc_login",
|
"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."
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -103,6 +103,7 @@ pub struct Config {
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
pub tls: TlsConfig,
|
pub tls: TlsConfig,
|
||||||
|
|
||||||
|
// external structure; separate section
|
||||||
pub auth: Option<AuthConfig>,
|
pub auth: Option<AuthConfig>,
|
||||||
|
|
||||||
/// The UNIX socket conduwuit will listen on.
|
/// The UNIX socket conduwuit will listen on.
|
||||||
|
|
Loading…
Add table
Reference in a new issue