Sign in programmatically
Is it possible to automate the sign in process? I was thinking of calling http://SERVER/Geocortex/Essentials/REST/security/signIn and pass the credentials, but I can't find any documentation about this.
The idea is that we want to embed Essentials in a Cordova app that another party is building. The user already has to sign in to that app, so we want to store the Essentials credentials inside the app (at least in the prototype phase), to prevent a second login form. At this stage, single sign on with AD is not an option yet.
-
Hi Berend,
This is not possible with the out-of-the-box security providers (unless the Cordova app is actually signing in to Identity Server). You would need a custom security provider to handle this.
Depending on the nature of the security implementation used by the host app this may be relatively simple. For example, if the host app uses OAuth2 for its sign in, then you could create a matching OAuth2 security provider in Essentials.
- The user loads the app
- The app initiates a sign-in using OAuth2
- The viewer loads
- The Essentials site is secured
- Essentials initiates a sign-in using OAuth2 (to the same service as above)
- Since the user is already signed in to this service there is no prompt for a username and password
- Essentials receives an access token and is now able to identify and validate the user
- Essentials returns a token to the viewer
- The viewer loads successfully
--Ryan
0 -
Hello! I'm interested in this issue as well.
I've noticed that after signin in the viewer is launched with a token with this syntax: http://maps.geographics.it/Html5Viewer/Index.html?locale=it-IT&configBase=http://maps.geographics.it/Geocortex/Essentials/REST/sites/Ravenna_TPS/viewers/TPS_html5/virtualdirectory/Resources/Config/Default#gcx-Zva8tQoUAUybsAIhV3w3PQAA5ZYwODJ_Y0W116XA5VQetgAAMHs1EDDnDzPaznoOnOv-BCauVo2jhLm0
If there is a way to generate this token from geocortex identity server using a web service or another kind of request,, then it could be possible to use this syntax to run the viewer. Is it possible?
Ciao
Guido Sitta
GeoGraphics srl
0 -
Hi Berend,
did you get it up-and-running.
I would like to test the rest-interface of a site and to do that I need to login into the rest interface to get a token which I can use to run my tests.
I hope you (or somebody else) can help me.
Luuk0 -
Hi Luuk, It's a long time ago and I don't quite remember what we did in the end. I think someone built a clever JavaScript module to parse the HTML returned by the login process. If you're actually using some kind of testing framework (JMeter, Postman, Selenium, ...), you might be able to use that to script the login process. Berend 0
Please sign in to leave a comment.
Comments
4 comments