-
Vasileios ThanasiasHas successfully completed the online course Basics (100)1 year ago #35829
Hello, is it possible to login via token (from query parameter), instead of username/password?
I would like to be able to use Simplifier.User.getCurrentUser(), to get info for the logged user.
Jennifer HäfnerHas successfully completed the online course Intermediate (200)Has successfully completed the online course Advanced (300)Has successfully completed the online course Basics (100)Has successfully completed the online course Advanced (310)Has successfully completed the online course Advanced (320)Has successfully completed the Intermediate CertificationHas successfully completed the Advanced Certification1 year ago #35833::Hi Vasileios,
When your URL contains the Simplifier token, you can access it in an Auto Field. Set the Auto Field type to ‘URL’, the characteristic to ‘Query Parameter’ and the Query Parameter to the name of the query parameter in the URL where the token is stored.
In the Process Designer, add a UI action that stores the value of the Auto Field in a Global Variable. After that, in a CSBO function (or in a script), set the token with the following code snippet:
var sToken = this.getGlobals().getVar("token"); // the global variable where your token from the auto field is stored this.Permission._setAjaxHeader(sToken);
With that code, the user corresponding to the Simplifier token is logged in.
Jennifer HäfnerHas successfully completed the online course Intermediate (200)Has successfully completed the online course Advanced (300)Has successfully completed the online course Basics (100)Has successfully completed the online course Advanced (310)Has successfully completed the online course Advanced (320)Has successfully completed the Intermediate CertificationHas successfully completed the Advanced CertificationJennifer HäfnerHas successfully completed the online course Intermediate (200)Has successfully completed the online course Advanced (300)Has successfully completed the online course Basics (100)Has successfully completed the online course Advanced (310)Has successfully completed the online course Advanced (320)Has successfully completed the Intermediate CertificationHas successfully completed the Advanced Certification1 year ago #35840::You can configure the token validity on your Simplifier instance (if you have admin permissions):
In the user menu on the upper right side, select the item ‘settings’. In the tab ‘Server’, you define how long the token should be valid.
https://community.simplifier.io/doc/installation-instructions/admin-settings/#server-settings
You must be logged in to reply to this topic.