You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-07-31 09:24:31 +03:00
graphql: Expose the BrowserSession User-Agent
This commit is contained in:
@ -87,6 +87,11 @@ impl BrowserSession {
|
|||||||
BrowserSessionState::Active
|
BrowserSessionState::Active
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// The user-agent string with which the session was created.
|
||||||
|
pub async fn user_agent(&self) -> Option<&str> {
|
||||||
|
self.0.user_agent.as_deref()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// An authentication records when a user enter their credential in a browser
|
/// An authentication records when a user enter their credential in a browser
|
||||||
|
@ -95,6 +95,10 @@ type BrowserSession implements Node & CreationEvent {
|
|||||||
The state of the session.
|
The state of the session.
|
||||||
"""
|
"""
|
||||||
state: BrowserSessionState!
|
state: BrowserSessionState!
|
||||||
|
"""
|
||||||
|
The user-agent string with which the session was created.
|
||||||
|
"""
|
||||||
|
userAgent: String
|
||||||
}
|
}
|
||||||
|
|
||||||
type BrowserSessionConnection {
|
type BrowserSessionConnection {
|
||||||
|
@ -100,6 +100,8 @@ export type BrowserSession = CreationEvent &
|
|||||||
state: BrowserSessionState;
|
state: BrowserSessionState;
|
||||||
/** The user logged in this session. */
|
/** The user logged in this session. */
|
||||||
user: User;
|
user: User;
|
||||||
|
/** The user-agent string with which the session was created. */
|
||||||
|
userAgent?: Maybe<Scalars["String"]["output"]>;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type BrowserSessionConnection = {
|
export type BrowserSessionConnection = {
|
||||||
|
@ -172,6 +172,14 @@ export default {
|
|||||||
},
|
},
|
||||||
args: [],
|
args: [],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "userAgent",
|
||||||
|
type: {
|
||||||
|
kind: "SCALAR",
|
||||||
|
name: "Any",
|
||||||
|
},
|
||||||
|
args: [],
|
||||||
|
},
|
||||||
],
|
],
|
||||||
interfaces: [
|
interfaces: [
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user