Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Token Url should use public generateToken instead of admin generateToken #44

Closed
farleyklotz opened this issue Jan 27, 2022 · 0 comments · Fixed by #48
Closed

Token Url should use public generateToken instead of admin generateToken #44

farleyklotz opened this issue Jan 27, 2022 · 0 comments · Fixed by #48

Comments

@farleyklotz
Copy link

farleyklotz commented Jan 27, 2022

This code is using the admin location to grab a Token. ERSI ArcGIS Online and other services use the 'public' url to get a token. On a secured server, the admin token url may not be available, but I think the 'public' one always is. The public one is at: "arcgis/tokens/generateToken" instead of "arcgis/admin/generateToken" as per: https://developers.arcgis.com/rest/services-reference/enterprise/generate-token.htm

Also, we can get iformation from the server info url, even on a server where directory services is disabled:
https://developers.arcgis.com/rest/services-reference/enterprise/server-info.htm

https://my.host.com/instance_name/rest/info?f=pjson

A json return looks like:

{
currentVersion: 10.61,
fullVersion: "10.6.1",
soapUrl: "https://geo.stantec.com/arcgis/services",
secureSoapUrl: null,
authInfo: {
    isTokenBasedSecurity: true,
    tokenServicesUrl: "https://geo.stantec.com/arcgis/tokens/",
    shortLivedTokenValidity: 120
    }
}

This info will be good for checking the intial validity.

@jacpete jacpete linked a pull request May 11, 2022 that will close this issue
@jacpete jacpete mentioned this issue May 11, 2022
jacpete added a commit that referenced this issue May 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant