Skip to main content
Version: 8.1

system.perspective.authenticationChallenge

New in 8.1.16

This function is used in Python Scripting.

Description​

Triggers an authentication challenge action.

Syntax​

system.perspective.authenticationChallenge([sessionId], [pageId], [idp], [forceAuth], [timeout], [payload], [framing])

Parameters​

TypeParameterDescription
StringsessionIdIdentifier of the Session to target. If omitted, the current Session will be used automatically. When targeting a different session, then the pageId parameter must be included in the call. [optional]
StringpageIdIdentifier of the page to target. If omitted, the current page will be used. [optional]
StringidpThe name of the IdP to use for this authentication challenge. If omitted, the Project default IdP will be used. [optional]
BooleanforceAuthTrue if Ignition should ask the IdP to re-authenticate the user, even if the user is already signed into the IdP. False if Ignition should not ask the IdP to re-authenticate the user. If the IdP supports this option, the IdP will ask the user to re-enter their credentials, even if the user is already signed into the IdP. If omitted, the default value for this argument will fall back to the value in the Project Properties. [optional]
Integertimeoutthe number of minutes the system will wait in between the authentication request and the authentication response before timing out the request. If set to any number <= zero, the request is rejected. If omitted, the default of two minutes will be used as the timeout. [optional]
AnypayloadAn opaque payload object that may contain any information. This object will be passed to the onAuthenticationChallengeCompleted session event script. The payload should be a JSON-encodable data structure. [optional]
StringframingA string representing the type of framing that should be used. A value of “self” indicates that the same window should be used. A value of “new” indicates that a new tab should be used. A value of “embedded” indicates that an embedded iframe should be used. If omitted, the default value of “self” (same window) is used. [optional]

Note: Mobile and workstation clients do not support "new" and will fall back to "self". Mobile clients do not support "embedded" and will fall back to "self".

Returns​

Nothing

Scope​

Gateway, Perspective Session

note

This function will only work in the Gateway scope if both sessionId and pageId are supplied to the call.

Code Examples​

Code Snippet
# Opens an authentication challenge in a new tab that will time out in three minutes.
system.perspective.authenticationChallenge(idp = "administrators", timeout = 3, payload = {"isAction":"true"}, framing = "new")

Keywords​

system perspective authenticationChallenge, perspective.authenticationChallenge