Privacy/Reviews/F1A: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 104: Line 104:
Communication with service iframes is tunneled through the mediator class.  There is no direct conduit
Communication with service iframes is tunneled through the mediator class.  There is no direct conduit
between the mediator content and the service content (even though the mediator content could directly access the service iframe).
between the mediator content and the service content (even though the mediator content could directly access the service iframe).
In order to tunnel a call into a service: the mediator content emits a owa.mediator.invoke port message that contains the data necessary to complete the calls below, along with string id's that the service iframe uses to send a response back.  To send a response, the service iframe will emit an owa.mediation.success.# or owa.mediation.error.# with the response data.


{| class="wikitable"
{| class="wikitable"
Line 461: Line 463:


'''Communication with mediator content'''  
'''Communication with mediator content'''  
{| class="wikitable"
|-
! Direction
! Message
! Data
! Notes
|-
| ''In:''
| owa.app.ready
| none
|
|-
| ''Out:''
| owa.app.ready
| origin
| one call for each service iframe, received after the service iframe has called owa.service.ready
|-
| ''In:''
| owa.mediation.setup
| none
|
|-
| ''Out:''
| owa.mediation.setup
| activity object, services list, caller href
| data necessary to setup the mediator UI and load service iframes
|-
| ''In:''
| owa.mediation.ready
| none
| called by mediator content after load is finished
|-
| ''Out:''
| owa.mediation.ready
| none
| no response to ready, rather a setup message it emitted.
|-
| ''In:''
| owa.mediation.sizeToContent
| width,height
| request the mediator class to resize the panel to fit the content
|-
| ''Out:''
| owa.mediation.sizeToContent
| none
|
|-
| ''In:''
| owa.mediation.onLogin
| auth configuration received from service iframe, may contain consumer oauth key/secret
| requests mediator class to manage logging in for a service
|-
| ''Out:''
| owa.mediation.doLogin
| authorization credentials if any (e.g. oauth user tokens)
| response from doLogin
|-
| ''In:''
| owa.success
| none
| sent upon successful send
|-
| ''Out:''
| owa.success
| none
|
|-
| ''In:''
| owa.failure
| failure message
| sent upon failure to send
|-
| ''Out:''
| owa.failure
| none
|
|-
| ''In:''
| owa.mediation.reconfigure
| none
|
|-
| ''Out:''
| owa.mediation.reconfigure
| none
| sent to mediator content to reconfigure (e.g. a share app was installed or removed)
|}


'''Communication with service iframes'''  
'''Communication with service iframes'''  


{| class="wikitable"
|-
! Direction
! Message
! Data
! Notes
|-
| ''In:''
| service.origin
| none
|
|-
| ''Out:''
| service.origin
| origin
| provides the app origin the code we inject into the service iframe, kind of an init for our injected code
|-
| ''In:''
| service.ready
| app origin
| same as origin in postMessage api
|-
| ''Out:''
| service.ready
| none
|
|-
| ''In:''
| service.registerHandler
| origin, activity and message
| all strings used by mediator to call a specific handler (e.g. url, "link.send", "confirm")
|-
| ''Out:''
| service.registerHandler
| none
|
|-
| ''In:''
| oauth.call
| auth service information, user tokens, url to oauth endpoint, parameters (share data)
| for oauth call which are sent to oauth endpoints
|-
| ''Out:''
| oauth.call
| results returned by call to oauth endpoint
|
|-
| ''In:''
| sendEmail.call
| user oauth tokens, share data, recipients list
|
|-
| ''Out:''
| sendEmail.call
| simple success/failure object
|
|}


=== OWA stuff  ===
=== OWA stuff  ===
Confirmed users
169

edits