canmove, Confirmed users
1,537
edits
(→Mediator Panel: simplification) |
|||
| Line 252: | Line 252: | ||
|- | |- | ||
| users oauth credentials, secrets, etc | | users oauth credentials, secrets, etc | ||
| localstorage ( | | localstorage (obtained using the Share Mediator Component) | ||
|} | |} | ||
'''Communication with | '''Communication with Share Mediator Panel''' | ||
Communication with | Communication with the Share Mediator Panel is tunneled through the Share Mediator Component. There is no direct conduit between the Share Mediator Panel and the 3rd Party Webapp component (even though the mediator content could directly access the service iframe via postmessage, it doesn't). Any call IN will have a response OUT, even if it is an empty response. | ||
between the | |||
Each app that supports the share activity implements these calls, each is registered using the registerHandler API. The built-in apps in Firefox Share have the implemenation. | Each app that supports the share activity implements these calls, each is registered using the registerHandler API. The built-in apps in Firefox Share have the implemenation. | ||
''This mirrors the "Communication with 3rd party webapp components" section of the Share Mediator Panel''. See that section for the details of this communication. | |||
'''Communication with mediator class''' | |||
These are all uni-directional calls with the exception of the oauth and sendEmail calls. The implementation of these APIs are in the openwebapps addon (see servicesapi.js). | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 270: | Line 276: | ||
|- | |- | ||
| ''In:'' | | ''In:'' | ||
| | | service.origin | ||
| | | app origin (scheme/host/port) | ||
| | | | ||
|- | |- | ||
| | | | ||
| | | service.registerHandler | ||
| none | | none | ||
| | | | ||
|- | |- | ||
| | | | ||
| | | oauth.call | ||
| | | results returned by call to oauth endpoint | ||
| | | | ||
|- | |- | ||
| | | | ||
| | | sendEmail.call | ||
| simple success/failure object | |||
| success/ | |||
| | | | ||
|- | |- | ||
| ''Out:'' | | ''Out:'' | ||
| service.ready | | service.ready | ||
| app origin | | app origin (scheme/host/port) | ||
| same as origin in postMessage api | | same as origin in postMessage api | ||
|- | |- | ||
| | | | ||
| service.registerHandler | | service.registerHandler | ||
| origin, activity and message | | origin, activity and message | ||
| all strings used by mediator to call a specific handler (e.g. url, "link.send", "confirm") | | all strings used by mediator to call a specific handler (e.g. url, "link.send", "confirm") | ||
|- | |- | ||
| | | | ||
| oauth.call | | oauth.call | ||
| auth service information, user tokens, url to oauth endpoint, parameters (share data) | | auth service information, user tokens, url to oauth endpoint, parameters (share data) | ||
| for oauth call which are sent to oauth endpoints | | for oauth call which are sent to oauth endpoints | ||
|- | |- | ||
| | | | ||
| sendEmail.call | | sendEmail.call | ||
| user oauth tokens, share data, recipients list | | user oauth tokens, share data, recipients list | ||