Comments (3)
Hi Arjan, thanks for logging this.
This snippet is actually old - using the JS API v3 syntx (for example, should be esri/identity/IdentityManager
instead of esri/id
). Could you please send a PR to update this snippet to the latest JS API? This can be found in https://github.com/Esri/arcgis-rest-js/tree/main/demos/jsapi-integration I think.
After that's updated, can you please provide an updated replication case.
from arcgis-rest-js.
Snippet (non-)issue
After further looking into this, I think that snippet is actually acceptable:
- The snippet uses findCredential, which "Returns the Credential for the resource identified by the specified url"
- The example in the REST JS sample uses getCredential, which "Returns a Credential object that can be used to access the secured resource identified by the input URL"
I think the Credential
that is returned from findCredential
or getCredential
should both be able to be passed into the ArcGIS REST JS ArcGISIdentityManager.fromCredential
function.
So I don't think the snippet is the issue.
Replication case
I was able to create a simple replication case for this issue in a StackBlitz:
https://stackblitz.com/edit/vitejs-vite-ikrxa2?file=src%2Fmain.ts,src%2Fstyle.css,src%2Fmap.ts&terminal=dev
That ^ is the original issue (I think).
Given that, I do agree with @arjanvanzutphen that owningSystemUrl
should be removed (or set to optional?) here. Note that this property does not seem to be included anymore: for example compare our fetch mock vs the actual response:
https://sampleserver6.arcgisonline.com/arcgis/rest/info/?f=json
{
"currentVersion": 10.91,
"fullVersion": "10.9.1",
"soapUrl": "https://sampleserver6.arcgisonline.com/arcgis/services",
"secureSoapUrl": null,
"authInfo": {
"isTokenBasedSecurity": true,
"tokenServicesUrl": "https://sampleserver6.arcgisonline.com/arcgis/tokens/",
"shortLivedTokenValidity": 60
}
}
from arcgis-rest-js.
Discussed with @patrickarlt, we propose to remove this line:
from arcgis-rest-js.
Related Issues (20)
- Tests not mocking requests to GPServer HOT 1
- Flakey tests HOT 1
- Expose error.details as a property on ArcGISRequestError and subclasses
- Version numbers in header of dist files do not match actual version HOT 1
- Creating a new feature with a point failing HOT 2
- Update REST JS places documentation to reflect pagination changes HOT 1
- Too many dependabot alerts
- Hub needs ability to search for users outside the currently authenticated user's organization HOT 2
- Provide option to force `/addItem` request to use `form-data` content type HOT 3
- Module Resolution not working with @tsconfig/node18/tsconfig.json HOT 4
- updateUserMemberships - Wrong documentation for parameters HOT 6
- REST JS Request 3.7.0 /bundled/ CDN not resolving HOT 2
- NPM Current version for @esri/arcgis-rest-request HOT 2
- v3 branch and release process improvements
- 🎃 𝗛𝗮𝗰𝗸𝘁𝗼𝗯𝗲𝗿𝗳𝗲𝘀𝘁 𝗗𝗲𝘁𝗮𝗶𝗹𝘀 𝗳𝗼𝗿 𝗣𝗮𝗿𝘁𝗶𝗰𝗶𝗽𝗮𝗻𝘁𝘀 👨💻 HOT 1
- Unit tests: `Deprecated: Passing fetch-mock reset methods directly in as handlers for before/after test runner hooks`
- Update automated unit tests to run on Node 20 HOT 4
- Issue running demos on Windows (path/rootDir issue) HOT 2
- Add support for new 'icon' param of places service
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arcgis-rest-js.