Privacy/Reviews/F1A: Difference between revisions

(→‎Mediator Panel: simplification)
Line 252: Line 252:
|-
|-
| users oauth credentials, secrets, etc
| users oauth credentials, secrets, etc
| localstorage (see oauthorizer component)
| localstorage (obtained using the Share Mediator Component)
|}
|}


'''Communication with mediator panel'''  
'''Communication with Share Mediator Panel'''  


Communication with mediator content is tunneled through the mediator class.  There is no direct conduit
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 mediator content and the service content (even though the mediator content could directly access the service iframe).  Any call IN will have a response OUT, even if it is an empty response.


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:''  
| getParameters
| service.origin
| none
| app origin (scheme/host/port)
|  
|
|-
|-
| ''Out:''
| getParameters
| parameter information for ui configuration and oauth
|  
|  
|-
| service.registerHandler
| ''In:''
| getShareTypeRecipients
| type of share (e.g. direct, public, group name)
|
|-
| ''Out:''
| getShareTypeRecipients
| abbreviated contact data for autocompletion support
|
|-
| ''In:''
| resolveRecipients
| list of recipients user has entered into TO field
|
|-
| ''Out:''
| resolveRecipients
| success/error of recipient validation
|
|-
| ''In:''
| getLogin
| none
| none
|  
|  
|-
|-
| ''Out:''
|  
| getLogin/getCredentials
| oauth.call
| user profile on success
| results returned by call to oauth endpoint
|  
|  
|-
|-
| ''In:''
|
| setAuthorization (1)
| sendEmail.call
| oauth credentials
| simple success/failure object
|
|-
| ''Out:''
| setAuthorization
| none
|
|-
| ''In:''
| confirm (2)
| page data(3)
| called when the user clicks "send"
|-
| ''Out:''
| confirm
| success/error of send
|
|-
| ''In:''
| logout/clearCredentials
| none
|  
|  
|-
| ''Out:''
| logout/clearCredentials
| none
|
|}
'''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"
|-
! Direction
! Message
! Data
! Notes
|-
| ''In:''
| service.origin
| origin
| provides the app origin the code we inject into the service iframe, kind of an init for our injected code
|-
|-
| ''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
|-
|-
| ''In:''
|
| service.registerHandler
| none
|
|-
| ''Out:''
| 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")
|-
|-
| ''In:''
|
| oauth.call
| results returned by call to oauth endpoint
|
|-
| ''Out:''
| 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
|-
|-
| ''In:''
|
| sendEmail.call
| simple success/failure object
|
|-
| ''Out:''
| sendEmail.call
| sendEmail.call
| user oauth tokens, share data, recipients list
| user oauth tokens, share data, recipients list
canmove, Confirmed users
1,537

edits