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

Save which user session created a compat session

This also exposes the user session in the GraphQL API, and allow
filtering on browser session ID on the app session list.
This commit is contained in:
Quentin Gliech
2024-02-21 10:59:18 +01:00
parent 03b6ad7138
commit ed5893eb20
21 changed files with 432 additions and 51 deletions

View File

@@ -411,7 +411,7 @@ async fn user_password_login(
let session = repo
.compat_session()
.add(&mut rng, clock, &user, device, false)
.add(&mut rng, clock, &user, device, None, false)
.await?;
Ok((session, user))
@@ -738,7 +738,14 @@ mod tests {
// Complete the flow by fulfilling it with a session
let compat_session = repo
.compat_session()
.add(&mut state.rng(), &state.clock, user, device.clone(), false)
.add(
&mut state.rng(),
&state.clock,
user,
device.clone(),
None,
false,
)
.await
.unwrap();

View File

@@ -208,7 +208,14 @@ pub async fn post(
let compat_session = repo
.compat_session()
.add(&mut rng, &clock, &session.user, device, false)
.add(
&mut rng,
&clock,
&session.user,
device,
Some(&session),
false,
)
.await?;
repo.compat_sso_login()