Logout
* 
This function replaces the Logout widget. To create the same functionality, bind the Clicked event of a Button widget to the function.
Logout functions are non-visual widgets that you can use to end the user session, and then redirect to a mashup or a URL.
The authentication for the Logout function is similar to the authentication for ThingWorx Platform. The Tomcat Session Manager controls the current sessions in the browser by storing a cookie with a JSESSIONID in the browser. When the Logout service is triggered, the current session ends, and the Tomcat Session Manager marks the JSESSIONID cookie as invalid. When a user attempts to use an invalid cookie to login, the Tomcat Session Manager notifies ThingWorx that the cookie is invalid, and ThingWorx invokes the Authenticators. If the process authentication is successful, a new session is created and a cookie with a new JSESSIONID is set in the browser.
You can bind the Logout property to an event, such as the Clicked property of a Button widget. When the button is clicked, the current session ends, and the user is redirected to a mashup or a URL. If the logout target is a mashup, the authentication dialog opens, and you must enter your credentials to access the target mashup. If the target type is set to URL, the target page opens, and you cannot return to previous page without signing in.
Function Options
You can set the following configuration options for the function:
Property
Description
Description
Sets a description for the function.
Redirect To
Specifies the type of target to redirect to after logout.
Logout Target Mashup
Specifies a mashup to redirect the user to after logout.
URL
The URL to redirect the user to after logout.
Creating a Logout Function
1. On the Functions panel, click . The New Function dialog opens.
2. Select Logout from the Function Type drop down list.
3. Enter a name for the function, and then click Next.
4. Modify the function options as required.
5. Click Done.
The function is added to the Functions panel.
Function Properties
The Logout function contains the following properties.
Property
Description
Base Type
Default Value
Bindable? (Y/N)
Localizable(Y/N)
Logout
A service that performs a logout and redirects the user to the target Mashup or URL.
n/a
n/a
Y
N
LogoutTargetMashup
Sets the target mashup to redirect to when the Logout event is triggered.
STRING
n/a
Y
N
URL
Sets the target URL.
STRING
n/a
Y
N
Was this helpful?