synapse_admin_api/register_users/shared_secret_register_nonce/
v1.rs

1//! [GET /_synapse/admin/v1/register](https://matrix-org.github.io/synapse/latest/admin_api/register_api.html#shared-secret-registration)
2
3use ruma::api::{metadata, request, response, Metadata};
4
5const METADATA: Metadata = metadata! {
6    method: GET,
7    rate_limited: false,
8    authentication: None,
9    history: {
10        unstable => "/_synapse/admin/v1/register",
11    }
12};
13
14#[request]
15#[derive(Default)]
16pub struct Request {}
17
18#[response]
19pub struct Response {
20    /// The nonce that can be used for shared-secret registration.
21    pub nonce: String,
22}
23
24impl Request {
25    /// Creates an empty `Request`.
26    pub fn new() -> Self {
27        Default::default()
28    }
29}
30
31impl Response {
32    /// Creates a `Response` with the given `nonce`.
33    pub fn new(nonce: String) -> Self {
34        Self { nonce }
35    }
36}