/Account/RemoteQuickLogin

Allows the client to trigger a Quick Login procedure on a remote Neuron, without having to scan a QR code, and if successful, logging in on the machine using a given Legal Identity.

Note: The call to the remote neuron does not require a login or an Agent API connection.

Note 2: A Legal ID can be used to login on multiple machines. If administrative access is granted to the corresponding Legal Identity, an administrative login will also be performed, if the login is successful.

Note 3: Only session logins (i.e. admin logins and quick-logins) can be made using this resource. No new JWT token will be generated, as the Agent API can only be connected to the broker associated with the account the agent is using.

Note 4: You can prepare the the remote quick login procedure by calling the /Account/PrepareRemoteQuickLogin resource to get the Legal ID associated with the current account.

Note 5: This method of initiating the Quick-Login does not require the client to scan a QR code. Instead, the request to sign the login is sent automatically to the client when the /Account/RemoteQuickLogin resource is called.

If authentication succeeds, a quick-login is performed automatically in the current session, and if there is an administrative account associated with the digital identity, such a login is also performed in the current session.

JSON

Request
{
	"legalId":Required(Str(PLegalId)),
	"purpose":Required(Str(PPurpose))
}
Response (if successful)
{
	"loggedIn":Required(Bool(PLoggedIn)),
	"petitionSent":Required(Bool(PPetitionSent))
}

XML

Request
<RemoteQuickLogin xmlns="https://waher.se/Schema/BrokerAgent.xsd"
                  legalId=(Required(Str(PLegalId)))
                  purpose=(Required(Str(PPurpose))) />
Response (if successful)
<RemoteQuickLoginResponse xmlns="https://waher.se/Schema/BrokerAgent.xsd"
                          loggedIn=(Required(Bool(PLoggedIn)))
                          petitionSent=(Required(Bool(PPetitionSent))) />

Input Parameters

Parameter Description
PLegalId The Legal ID of the current user. This ID will receive the signature request in order to Quick-Login on the remote Neuron.
PPurpose The purpose string to show to the user in the app.

Response Parameters

Parameter Description
PLoggedIn If the user was already logged in on the machine. If this is true, no petition is sent and no Quick-Login is necessary.
PPetitionSent If a petition was sent to the client with the corresponding Legal Identity.

Note: A successful Quick-Login will be indicated by the asynchornous event sent to the client, as described in the Quick Login documentation.

Note 2: Both PLoggedIn and PPetitionSent can be false, if the broker does not have a valid Legal Identity itself. Quick-Login requires the Neuron to be able to identify itself.

Javascript Library

Use the following asynchronous method in the Javascript Library, to call this resource.

var Response = await AgentAPI.Account.RemoteQuickLogin(Domain,LegalId,Purpose);

Note: Make sure CORS headers are configured such that calls to the remote Neuron can be made without being rejected by the browser.

Note 2: The Domain argument is the domain name of the remote Neuron on which the Quick-Login will be performed.

Test




Request Payload:

   

Response Payload: