• Resources
    • Documentation
    • Knowledge Base
    • Forum
    • Courses
    • Webinars
    • FAQ
    • Changelog
    • Blog
    • Swag Shop
  • Marketplace
  • Start for Free
  • Login
  • Resources
    • Documentation
    • Knowledge Base
    • Forum
    • Courses
    • Webinars
    • FAQ
    • Changelog
    • Blog
    • Swag Shop
  • Marketplace
  • Start for Free
  • Login
home/Knowledge Base/How to's

How to check Simplifier Token Validity

70 views 1 February 8, 2021 Nina Schmidt

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?

1 Yes  No
Related Articles
  • How to Use Data Services
  • Using SAP UI Theme Designer
  • How to integrate and use external libraries in Simplifier Apps
  • Plugin development with NodeJS
  • Execute Google Scripts via API
Leave A Comment Cancel reply

You must be logged in to post a comment.

Trending
  • Example Apps
  • Introduction
  • Install Simplifier on Azure
  • OpenUI5, SAPUI5 and Fiori
  • Create your first Application
  • Execute Google Scripts via API
  • Using SAP UI Theme Designer
  • Prerequisites & Helpful Links
  • How to integrate with SAP Business API Hub
  • Identity Provider Setup

Our support Staff is available 9 AM - 6 PM, Monday to Friday. Please be patient when posting an issue as staff may not be in the same timezone as you.

  • Contact | Imprint | Privacy | © 2020 Simplifier AG. All Rights Reserved.