Force authentication of a user via script

I have a legacy SCADA system “Wonderware” that writes the values firstname/lastname in a DB for a station and I want to use that data to authenticate the same user in ignition.

Can I use a query to “force” ignition to read the value from the db and login the same person? I am trying to make it easier for the person to leave the Legacy SCADA and not have to re-login to my ignition app.

Thanks!

I don’t understand how that authenticates anyone, but, taking the question at face value:
Vision does not allow you to login without some valid user. However, you can run scripts to switch what user you are using (system.security.switchUser).

I would do something like the following:

  1. Have a bare project with auto-login enabled. This project’s only purpose will be to display some intermediate ‘loading’ graphic for a split second before the rest of this process kicks off.
  2. On startup of that project, use scripting to query the DB (?) for the authentication info, then pass it to switchUser.
  3. Call system.util.retarget to swap from the ‘empty’ project with the autologin user to the real project (now that you’re authenticated).

You need the second project so that auto-login isn’t a confusing/misleading operation on your real project, and to make it easier to lock down the main project.

Sorry I didn’t specify this, I’m developing this project in perspective. The switchuser function doesn’t work in perspective. If I have the string “B.Johnson” I want to force perspective to authenticate “B.Johnson” from my Active directory source in my project.