synapse_admin_api/register_users/shared_secret_register_nonce/
v1.rs

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