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

@ -80,6 +80,12 @@ impl TryFrom<String> for Device {
}
}
impl std::fmt::Display for Device {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str(&self.id)
}
}
#[cfg(test)]
mod test {
use oauth2_types::scope::OPENID;

View File

@ -68,6 +68,7 @@ pub struct CompatSession {
pub user_id: Ulid,
pub device: Device,
pub created_at: DateTime<Utc>,
pub is_synapse_admin: bool,
}
impl std::ops::Deref for CompatSession {