• Resources
    • Documentation
    • Knowledge Base
    • Forum
    • Webinars and Videos
    • Courses
    • FAQ
    • Changelog
    • Blog
    • Swag Shop
  • Marketplace
  • Login
  • Resources
    • Documentation
    • Knowledge Base
    • Forum
    • Webinars and Videos
    • Courses
    • FAQ
    • Changelog
    • Blog
    • Swag Shop
  • Marketplace
  • Login
home/Knowledge Base/How to's/How to check Simplifier Token Validity

How to check Simplifier Token Validity

237 views 3

Written by Nina Schmidt
February 8, 2021

You want to let your app user know when his authentication is expired?

We created two functions in our utilities Business Objects (BOs) which show a dialog informing the app user that his authentication is expired. Here is how you can use them.

Prerequisites – Check if the BOs are available on your instance

You need the following two BOs:

  1. The client-side Business Object ITIZ_Utilities with the function checkTokenValidity
A screenshot showing the client-side business object ITIZ_Utilities in the BO overview
A screenshot showing the function checkTokenValidity of the client-side business object ITIZ_Utilities

2. The server-side business object SF_Utilities with the function isAlive

A screenshot showing the server-side business object SF_Utilities in the BO overview
A screenshot showing the function isAlive of the server-side business object SF_Utilities

3. Also the server-side BO SF_Utilities has to be added as a dependency to the client-side ITIZ_Utilities.

Edit view of the BO ITIZ_Utilities with the dependency SF_Utilities

If you can’t find the BOs or if one of the functions is missing you can download them below and import them to your instance.

Download Business Objects

Step 1 – Add BO in your App

Navigate to the Process Designer in your application logic.
Then add the client-side Business Object ITIZ_Utilities with function checkTokenValidity after your login action.

The login story in the process designer with the BO ITIZ_Utilities function checkTokenValidity

Step 2 – Configure input mapping of BO

In the input mapping of the function checkTokenValidity in the BO ITIZ_Utilities, you have to set 4 parameters:

  • tokenValidFor (Integer): The time (in seconds) a token is valid for on your instance plus additional 30 seconds. Note: Ask your administrator how long a token is valid for as described in section “Background information” of this article.
  • checkInterval (Integer): The time interval (in seconds) after which your app will check if the user has an active token. Each iteration will execute the server-side Business Object function call “isAlive”. Note: This function will trigger an empty http request to the server.
  • dialogTitle (String): The title of the dialog which pops up during application runtime when the token is invalid.
  • dialogText (String): The message of the dialog which pops up during application runtime when the token is invalid.
An example input mapping configuration of ITIZ_Utilities function checkTokenValidity

You can find an example application with the complete configuration and all nessecary BOs down below.

Download Sample App

Background information: Simplifier Token in general

On each Simplifier instance an administrator is able to configure if the authentication token will expire in the general settings.

If the token expiry is turned on, the time when the token will expire can be set as well as how often the token validity will be checked in the Simplifier UI.

Screenshot of the token settings in the Simplifier

In the example shown above the Simplifier authentication token will expire after 1 hour. Every 10 seconds a check is performed if the token is still valid.

As long as a user stays active in a Simplifier app or the Simplifier UI the token will be automatically refreshed.

As soon as an app user becomes inactive for a longer period of time than specified in the settings, he will receive an error if he triggers any actions which rely on communication with the server (e.g., Connectors).

To let the user know about the expiry of his Simplifier token during application runtime, we created the functions mentioned above.

Was this article helpful?

3 Yes  1 No
Related Articles
  • REST: Use a CSRF Token and a Cookie to authorize Requests
  • Use the Adobe PDF Embed API in your Simplifier Application
  • Simplifer setup with recommended environment using docker-compose
  • Logs and Monitoring in Simplifier
  • Version and Release Management in Simplifier
  • Dynamic where-clause and repeatable statement
Leave A Comment Cancel reply

You must be logged in to post a comment.

Latest Articles
  • REST: Use a CSRF Token and a Cookie to authorize Requests
  • Use the Adobe PDF Embed API in your Simplifier Application
  • Process Designer: Keeping an overview
  • Contact | Imprint | Privacy | © 2022 Simplifier AG. All Rights Reserved.

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.