Skip to main content

Sign in programmatically

Comments

4 comments

  • Ryan Cooney

    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.

    1. The user loads the app
    2. The app initiates a sign-in using OAuth2
    3. The viewer loads
    4. The Essentials site is secured
    5. Essentials initiates a sign-in using OAuth2 (to the same service as above)
    6. Since the user is already signed in to this service there is no prompt for a username and password
    7. Essentials receives an access token and is now able to identify and validate the user
    8. Essentials returns a token to the viewer
    9. 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
  • Luuk Schaminée
    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.

     

     

    Luuk
    0
  • Berend Veldkamp
    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.