fix oidc_provider discovery message and docstrings

This commit is contained in:
lafleur 2025-05-10 19:17:11 +02:00 committed by Jade Ellis
parent 8beaa55352
commit 95f25f67cf
No known key found for this signature in database
GPG key ID: 8705A2A3EBF77BD2
2 changed files with 4 additions and 4 deletions

View file

@ -34,7 +34,7 @@ pub(crate) async fn get_auth_metadata(
http::StatusCode::NOT_FOUND,
ClientErrorBody::Standard {
kind: ClientErrorKind::Unrecognized,
message: "This homeserver doesn't do OIDC authentication.".to_owned(),
message: "This homeserver has disabled OIDC authentication.".to_owned(),
},
)));
let Some(ref auth) = services.server.config.auth else {

View file

@ -117,10 +117,10 @@ pub fn build(router: Router<State>, server: &Server) -> Router<State> {
.ruma_route(&client::get_protocols_route)
.route("/_matrix/client/unstable/thirdparty/protocols",
get(client::get_protocols_route_unstable))
// MSC2965 route.
// MSC2965: OAuth 2.0 Authorization Server Metadata discovery.
.route("/_matrix/client/unstable/org.matrix.msc2965/auth_metadata",
get(client::get_auth_metadata))
// MSC2964 routes.
// MSC2964: Usage of OAuth 2.0 authorization code grant and refresh token grant.
.route("/_matrix/client/unstable/org.matrix.msc2964/authorize",
get(client::authorize))
.route("/_matrix/client/unstable/org.matrix.msc2964/authorize",
@ -129,7 +129,7 @@ pub fn build(router: Router<State>, server: &Server) -> Router<State> {
post(client::oidc_login))
.route("/_matrix/client/unstable/org.matrix.msc2964/token",
post(client::token))
// MSC2966 route.
// MSC2966: Usage of OAuth 2.0 Dynamic Client Registration in Matrix.
.route("/_matrix/client/unstable/org.matrix.msc2964/device/register",
post(client::register_client))
.ruma_route(&client::send_message_event_route)