Hi, I'm trying to figure out how to setup my Javascript API proxy.config "serverUrl" so it works with secured services on our Portal federated ArcGIS Server. I have not found any documentation that seems useful in this regard.
Our Portal is using default portal authentication and the ArcGIS Server is federated with the portal.
Do I use the ArcGIS Online style entry with clientId and clientSecret or do I use the ArcGIS Server token based pattern; username and password with tokenServiceUri? Or something else? Where does the token come from? Portal or Server?
If anyone could give me some examples, I would appreciate it.
Thanks, Dave
Solved! Go to Solution.
I figured it out. Point the proxy to the Portal token page and give it the user and password with permission to use the service.
<?xml version="1.0" encoding="utf-8" ?>
<ProxyConfig allowedReferers="*" mustMatch="false">
<serverUrls>
<serverUrl
url="https://yourdomain.com/arcgis/"
username="youruser"
password="yourpass"
tokenServiceUri="https://yourdomain.com/portal/sharing/generateToken"
matchAll="true">
</serverUrl>
</serverUrls>
</ProxyConfig>
I figured it out. Point the proxy to the Portal token page and give it the user and password with permission to use the service.
<?xml version="1.0" encoding="utf-8" ?>
<ProxyConfig allowedReferers="*" mustMatch="false">
<serverUrls>
<serverUrl
url="https://yourdomain.com/arcgis/"
username="youruser"
password="yourpass"
tokenServiceUri="https://yourdomain.com/portal/sharing/generateToken"
matchAll="true">
</serverUrl>
</serverUrls>
</ProxyConfig>