pub mod v1 {
use ruma_common::{
OwnedUserId,
api::{auth_scheme::NoAuthentication, request, response},
metadata,
};
metadata! {
method: GET,
rate_limited: false,
authentication: NoAuthentication,
path: "/_matrix/federation/v1/openid/userinfo",
}
#[request]
pub struct Request {
#[ruma_api(query)]
pub access_token: String,
}
#[response]
pub struct Response {
pub sub: OwnedUserId,
}
impl Request {
pub fn new(access_token: String) -> Self {
Self { access_token }
}
}
impl Response {
pub fn new(sub: OwnedUserId) -> Self {
Self { sub }
}
}
}