Skip to content
This repository has been archived by the owner on Apr 26, 2023. It is now read-only.

try to get token from cookie #288

Closed
wants to merge 2 commits into from
Closed

Conversation

jontwo
Copy link

@jontwo jontwo commented Aug 25, 2015

We've been trying to develop a secure site where the token is saved off in a cookie, similar to this sample, but using document.cookie instead of local storage.

Esri IdentityManager is supposed to append this cookie to all calls to the arcgis server, but it isn't working. Some calls are still going through to the server without a token appended to the url. This change is an attempt to get the proxy to check the cookie and append the token whenever IdentityManager fails to do so.

Hopefully it's not just specific to our project and may be of some use to others. It's just one additional check if the proxy hasn't managed to recover a token.

I've also moved the storeToken logic into a method, as the same code appeared in a few places (and added a few log statements).

@bsvensson
Copy link
Member

@jontwo - to you have a test case for when IdentityManager doesn't do what you expect it to do? Do you know if this has been reported to Esri Support, or maybe discussed on GeoNet?

@jontwo
Copy link
Author

jontwo commented Aug 26, 2015

I've raised it on Geonet (https://geonet.esri.com/thread/164191) to a deafening silence - I'll raise a support call too. Maybe I've misunderstood what IdentityManager was supposed to do, but I got the impression that once it was initialized, all calls to secured services would be authenticated. This is not happening for us.

@github-actions github-actions bot deleted the branch Esri:master August 2, 2021 23:01
@github-actions github-actions bot closed this Aug 2, 2021
@jontwo jontwo deleted the tokenfromcookie branch August 3, 2021 08:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants