Add federation OpenID userinfo API
* Add federation OpenID userinfo API On-behalf-of: Julian Tescher <jatescher@gmail.com>
This commit is contained in:
parent
39b37e4fab
commit
0d055e05d2
@ -18,6 +18,9 @@ Improvements:
|
||||
create_join_event::v1,
|
||||
create_join_event_template::v1
|
||||
},
|
||||
openid::{
|
||||
get_openid_userinfo::v1
|
||||
},
|
||||
query::{
|
||||
get_profile_information::v1,
|
||||
get_room_information::v1,
|
||||
|
@ -7,5 +7,6 @@ mod serde;
|
||||
pub mod directory;
|
||||
pub mod discovery;
|
||||
pub mod membership;
|
||||
pub mod openid;
|
||||
pub mod query;
|
||||
pub mod transactions;
|
||||
|
3
ruma-federation-api/src/openid.rs
Normal file
3
ruma-federation-api/src/openid.rs
Normal file
@ -0,0 +1,3 @@
|
||||
//! OpenID endpoints.
|
||||
|
||||
pub mod get_openid_userinfo;
|
@ -0,0 +1,3 @@
|
||||
//! Endpdoint for retrieving OpenID userinfo.
|
||||
|
||||
pub mod v1;
|
26
ruma-federation-api/src/openid/get_openid_userinfo/v1.rs
Normal file
26
ruma-federation-api/src/openid/get_openid_userinfo/v1.rs
Normal file
@ -0,0 +1,26 @@
|
||||
//! [GET /_matrix/federation/v1/openid/userinfo](https://matrix.org/docs/spec/server_server/r0.1.4#get-matrix-federation-v1-openid-userinfo)
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_identifiers::UserId;
|
||||
|
||||
ruma_api! {
|
||||
metadata: {
|
||||
description: "Exchanges an OpenID access token for information about the user who generated the token.",
|
||||
method: GET,
|
||||
name: "get_openid_userinfo",
|
||||
path: "/_matrix/federation/v1/openid/userinfo",
|
||||
rate_limited: false,
|
||||
requires_authentication: false,
|
||||
}
|
||||
|
||||
request: {
|
||||
/// The OpenID access token to get information about the owner for.
|
||||
#[ruma_api(query)]
|
||||
pub access_token: String,
|
||||
}
|
||||
|
||||
response: {
|
||||
/// The Matrix User ID who generated the token.
|
||||
pub sub: UserId,
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user