-
Notifications
You must be signed in to change notification settings - Fork 22
Description
The WoT Scripting document should mention in respective places that while one can invoke all the methods in the API in order to achieve listed use cases, some of them may fail (fully or return only partial results) due to security restrictions. It also should emphasis of the importance for scripts to be ready for such security-failures and handle them at least safely.
I would propose to define a single (unless anyone has requirements to separate different cases of security errors or expose lower-level security errors up to the WoT level) security-related error in the scripting doc and each API should state if it is possible to get this error in return and why:
For example, the invokeAction() method from ComsumedThing interface might easily return a security-error if the client does not posses correct credentials.
Also, for some methods it should be explained that while they do not return any security-related errors, the results that they return might be limited because of some security restrictions:
For example, the discover() method might return only partial results for the actually present WoT Things around due to some security limitations (some devices won't reply to discovery broadcast, etc. ).
I think it is important to specify how each API behaves with regards to security that WoT developers can write their scripts correctly.