ruma_client_api/discovery/get_authentication_issuer.rs
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
//! `GET /_matrix/client/*/auth_issuer`
//!
//! Get the OpenID Connect Provider that is trusted by the homeserver.
//!
//! This endpoint has been replaced by [`get_authorization_server_metadata`] in [MSC2965].
//!
//! [`get_authorization_server_metadata`]: super::get_authorization_server_metadata
//! [MSC2965]: https://github.com/matrix-org/matrix-spec-proposals/pull/2965
pub mod msc2965 {
//! `MSC2965` ([MSC])
//!
//! [MSC]: https://github.com/matrix-org/matrix-spec-proposals/pull/2965
use ruma_common::{
api::{request, response, Metadata},
metadata,
};
const METADATA: Metadata = metadata! {
method: GET,
rate_limited: false,
authentication: None,
history: {
unstable => "/_matrix/client/unstable/org.matrix.msc2965/auth_issuer",
}
};
/// Request type for the `auth_issuer` endpoint.
#[request(error = crate::Error)]
#[derive(Default)]
#[deprecated = "Replaced by the get_authorization_server_metadata endpoint."]
pub struct Request {}
/// Request type for the `auth_issuer` endpoint.
#[response(error = crate::Error)]
pub struct Response {
/// The OpenID Connect Provider that is trusted by the homeserver.
pub issuer: String,
}
#[allow(deprecated)]
impl Request {
/// Creates a new empty `Request`.
pub fn new() -> Self {
Self {}
}
}
impl Response {
/// Creates a new `Response` with the given issuer.
pub fn new(issuer: String) -> Self {
Self { issuer }
}
}
}