From Bright Pattern Documentation
Jump to: navigation, search
(Created page with "<translate> = getLoginState = Receive the login state, session and agent ID if user authorized. == Request == === Syntax === {| class="wikitable" |getLoginState(): Promise<...")
(No difference)

Revision as of 13:37, 16 September 2022

• 5.19

<translate>

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.

</translate>

< Previous | Next >