Esri Geoportal Server has the option to secure datasets, such that it's necessary to log in to view them:

enter image description here

My questions:

  1. Is it possible to interact with this login functionality programatically?

I'd like to provide the login form on another web page, then pass the parameters to Esri Geoportal in the background, without displaying the above user interface.

  1. Can I detect whether the user is logged in (or not) via the Geoportal's REST API? The documentation doesn't mention user management.

(There is a sample Geoportal Server instance at http://gptogc.esri.com/geoportal/catalog/main/home.page which may be useful for testing.)

  • 1
    I know that it is. ArcGISonline and geocortex both use this functionality to save the credentials with the webmap/site respectively. arcgisonline gets quite complicated about it using a hidden redirect. Not sure how geocortex manages it. It is an optional tick to save credentials and get a token from those creds. (also not sure about web tier as opposed to gis tier.) As far as rest api. The ags rest api reports the user logged in on the rest admin page. – Brad Nesom Nov 12 '14 at 16:27
  • @BradNesom thanks, this sounds promising. Can you please elaborate on the rest admin page? Using gptogc.esri.com/geoportal as the example, where can I access this? – Stephen Lead Nov 12 '14 at 23:33
  • It seems that Brad was talking about Portal for ArcGIS rather than Esri Geoportal Server - Esri love to re-use the same names for completely different products..... – Stephen Lead Nov 16 '14 at 10:45

Hei, This might be helpful: http://help.arcgis.com/en/geoportal_extension/10.0/help/index.html#/REST_API_Syntax/00t000000029000000/ It has some samples on how to query and links to docs.

  • Thanks for the tip - but if you look closely this document doesn't touch on login/admin functions, at least as far as I can see? It appears that the login functions aren't exposed via the REST API. – Stephen Lead Nov 13 '14 at 3:16

So sadly it looks like it's not possible to interact with the login/logout functions programatically, and there's no way to determine whether a user is logged in by querying the REST API.

A partial workaround is to put the Login page within an iframe within my application, and have the user log in/out using this.

It's far from ideal so I'd love to hear from anyone with a better solution.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.