Skip to main content
Version: 8.1
View as Markdown

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.
  • self: indicates that the same window should be used.
  • new: Indicates that a new tab should be used.
  • embedded: indicates that an embedded Iframe should be used. Some IDPs may require Content-Security-Policy or other configuration changes to display their login page in the Session's Iframe.
If omitted, the default value of self (same window) is used. [optional]

Note: Perspective Workstation Sessions do not support new and will fall back to self. Mobile Sessions only support 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")