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