1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-07-29 22:01:14 +03:00

Add a admin flag to the compatibility session

Also adds a CLI tool to issue a compatibility token.
This commit is contained in:
Quentin Gliech
2023-06-16 14:30:40 +02:00
parent 08d9b0b886
commit 2a514cf452
13 changed files with 185 additions and 70 deletions

View File

@ -49,6 +49,7 @@ pub trait CompatSessionRepository: Send + Sync {
/// * `clock`: The clock used to generate timestamps
/// * `user`: The user to create the compat session for
/// * `device`: The device ID of this session
/// * `is_synapse_admin`: Whether the session is a synapse admin session
///
/// # Errors
///
@ -59,6 +60,7 @@ pub trait CompatSessionRepository: Send + Sync {
clock: &dyn Clock,
user: &User,
device: Device,
is_synapse_admin: bool,
) -> Result<CompatSession, Self::Error>;
/// End a compat session
@ -89,6 +91,7 @@ repository_impl!(CompatSessionRepository:
clock: &dyn Clock,
user: &User,
device: Device,
is_synapse_admin: bool,
) -> Result<CompatSession, Self::Error>;
async fn finish(