Skip to main content

auth_metadata

Function auth_metadata 

Source
async fn auth_metadata(
    state: State<ServerState>,
) -> Result<Json<Map<String, Value>>, AuthMetadataError>
Expand description

Handler for GET /_matrix/client/v1/auth_metadata (See https://spec.matrix.org/unstable/client-server-api/#get_matrixclientv1auth_metadata). For compatibility, this is also exposed under the old experimental endpoint GET /_matrix/client/unstable/org.matrix.msc2965/auth_metadata.

NOTE: Ruma has not implemented this endpoint yet. The Matrix OpenAPI specification of this endpoint (getAuthMetadata, see https://github.com/matrix-org/matrix-spec/blob/2aacc1feda4bd949d1148755ab724718f03c4a3a/data/api/client-server/oauth_server_metadata.yaml#L48) is missing some response fields that are required by Element for successful login. Therefore, we just pass the entire metadata as we got it from the upstream IdP.