eclipse-thingweb / eclipse-thingweb/node-wot
[core][feature] Fetching TDs behind authentication mechanism is not possible
- Dominant language
- TypeScript
- Stars
- 192
- Forks
- 100
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 6
Description
When using the fetch function in `core/helpers.ts`, it is not possible to supply credentials required to fetch a TD. Once I look at the underlying implementation, it calls the `readResource` of the corresponding binding. This means that, if we change the fetch function's interface to accept credentials, it would need to be transferred to the corresponding binding. This might sadly require more changes since the credentials are added based on the id and there is no id at that point. It could very well be that where the TD is fetched have different security mechanism.
I would thus propose that instead of mapping fetch to readResource, another function can be created in each binding that has a different interface. This is related to an issue in Scripting API: https://github.com/w3c/wot-scripting-api/issues/216
Contributor guide
Assessment
This issue has not been assessed yet.