From Bright Pattern Documentation
(Created page with "<translate> = getLoginState = Receive the login state, session and agent ID if user authorized. == Request == === Syntax === {| class="wikitable" |getLoginState(): Promise<...") |
(Updated via BpDeleteTranslateTags script) |
||
Line 1: | Line 1: | ||
− | + | ||
= getLoginState = | = getLoginState = | ||
Line 75: | Line 75: | ||
|If the requesting user has the appropriate privilege, this value returns the current session ID. | |If the requesting user has the appropriate privilege, this value returns the current session ID. | ||
|} | |} | ||
− |
Latest revision as of 04:01, 29 May 2024
• 5.19
getLoginState
Receive the login state, session and agent ID if user authorized.
Request
Syntax
getLoginState(): Promise<OperationResult<LoginStateData>> |
Where:
type LoginStateData = {
isLoggedIn: boolean agentId?: string username?: string sessionId?: string } |
Parameters
(None)
Example Request
getLoginStateButton.onclick = () => {
adApi.getLoginState()
}
Return Value
Object | Object Values | Data Type | Optional?
(Y/N) |
Return Value Description |
LoginStateData | ||||
isLoggedIn | Boolean | N | If the value is true, the agent is logged in; if the value is false the agent is not logged in. | |
agentId | String | Y | If the requesting user has the appropriate privilege, this value returns the user’s agent ID. | |
username | String | Y | If the requesting user has the appropriate privilege, this value returns the user’s username. | |
sessionId | String | Y | If the requesting user has the appropriate privilege, this value returns the current session ID. |