1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-08-09 04:22:45 +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

@@ -223,6 +223,36 @@ type BrowserSession implements Node & CreationEvent {
The last time the session was active.
"""
lastActiveAt: DateTime
"""
Get the list of both compat and OAuth 2.0 sessions started by this
browser session, chronologically sorted
"""
appSessions(
"""
List only sessions in the given state.
"""
state: SessionState
"""
List only sessions for the given device.
"""
device: String
"""
Returns the elements in the list that come after the cursor.
"""
after: String
"""
Returns the elements in the list that come before the cursor.
"""
before: String
"""
Returns the first *n* elements from the list.
"""
first: Int
"""
Returns the last *n* elements from the list.
"""
last: Int
): AppSessionConnection!
}
type BrowserSessionConnection {
@@ -288,6 +318,10 @@ type CompatSession implements Node & CreationEvent {
"""
ssoLogin: CompatSsoLogin
"""
The browser session which started this session, if any.
"""
browserSession: BrowserSession
"""
The state of the session.
"""
state: SessionState!
@@ -1473,6 +1507,10 @@ type User implements Node {
"""
device: String
"""
List only sessions for the given session.
"""
browserSession: ID
"""
Returns the elements in the list that come after the cursor.
"""
after: String