eclipse-thingweb / eclipse-thingweb/node-wot

[core][feature] Fetching TDs behind authentication mechanism is not possible

Open
#269 1 comment 1 reaction 0 assignees View on GitHub
core discovery
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.