mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-07-28 10:48:30 +00:00
17 lines
483 B
Rust
17 lines
483 B
Rust
|
use ruma::api::federation::openid::get_openid_userinfo;
|
||
|
|
||
|
use crate::{services, Result, Ruma};
|
||
|
|
||
|
/// # `GET /_matrix/federation/v1/openid/userinfo`
|
||
|
///
|
||
|
/// Get information about the user that generated the OpenID token.
|
||
|
pub(crate) async fn get_openid_userinfo_route(
|
||
|
body: Ruma<get_openid_userinfo::v1::Request>,
|
||
|
) -> Result<get_openid_userinfo::v1::Response> {
|
||
|
Ok(get_openid_userinfo::v1::Response::new(
|
||
|
services()
|
||
|
.users
|
||
|
.find_from_openid_token(&body.access_token)?,
|
||
|
))
|
||
|
}
|