switchUser function in perspective

Hey,

I was using a switchUser function in vision through all of my projects so far, which enabled my projects to login/switch users, whenever a vadge was scanned.

Right now I am trying to recreate something like this in perspective. Therefore I just catch a string as keyboard input, which matches a regex expression and then a script SessionEvent-Script is triggered.
Generally I am able to check if I could login with system.security.validateUser, but i cannot find a way to do the same, to actually log in as a user.
I want to get rid of the login screen, where need to press any login button, and then again need to either use the badge or enter username and password, to authenticate towards the IdP.
Just scan badge -> logged in. :slight_smile:

Kind regards

Basically, you cannot.

Perspective relies on standardized Identity Provider technology, which has no method for scripting a login operation.

1 Like

Okay, so what does the validateUser function do. Isn't this also authenticating towards the IdP?

No. validateUser works against user sources, our "classic" authentication mechanism that's bespoke to Ignition. Identity providers are a standardized technology, not an Ignition invention.
Ignition itself can act as a bridge IdP, using user sources as the backing source of authorization/authentication, which is the only situation in Perspective where validateUser would work.

2 Likes