@openfin/cloud-interop
TypeScript icon, indicating that this package has built-in type declarations

0.36.12 • Public • Published

@openfin/cloud-interop

This package contains an override that enables Cloud Interop for OpenFin InteropBroker's unlocking Interop across applications and devices.

Overrides are passed to fin.Platform.init when initializing a platform or to fin.Interop.init when creating an InteropBroker directly.

Once overriden the InteropBroker will connect to Cloud Interop. Context will be sent to the Cloud Interop server and the broker will receive Context updates from other any other connected brokers in the shared session.

Auth

Using the service currently requires user credentials provided by OpenFin, please contact support@openfin.co.

Usage

In a Platform:

import { cloudInteropOverride } from "@openfin/cloud-interop";
import { ExampleOverride } from "./example";

const cloudConfig = {
  userId: "andy", // Credentials provided by OpenFin
  password: "asdf1234", // Credentials provided by OpenFin
  platformId: "8cef8205-d5a8-41c4-b368-47475b32c019", // Shared identifier for apps that should communicate
  url: "<CLOUD_INTEROP_SERVER_URL>",
  sourceId: fin.me.identity.uuid,
  source: "Desktop",
};

const InitializedCloudInteropOverride = await cloudInteropOverride(cloudConfig);

// Ordering is important, ensure Cloud Interop Override is at the end of the list to send overriden Context to the cloud
await fin.Platform.init({
  interopOverride: [ExampleOverride, InitializedCloudInteropOverride],
});

When creating an InteropBroker directly:

import { cloudInteropOverride } from "@openfin/cloud-interop";

const cloudConfig = {
  userId: "andy", // Credentials provided by OpenFin
  password: "asdf1234", // Credentials provided by OpenFin
  platformId: "8cef8205-d5a8-41c4-b368-47475b32c019", // Shared identifier for apps that should communicate
  url: "<CLOUD_INTEROP_SERVER_URL>",
  sourceId: fin.me.identity.uuid,
  source: "Desktop",
};

const InitializedCloudInteropOverride = await cloudInteropOverride(cloudConfig);

await fin.Interop.init(fin.me.uuid, InitializedCloudInteropOverride);

Readme

Keywords

none

Package Sidebar

Install

npm i @openfin/cloud-interop

Weekly Downloads

322

Version

0.36.12

License

SEE LICENSE IN LICENSE.md

Unpacked Size

429 kB

Total Files

8

Last publish

Collaborators

  • eoyewobi
  • yongji.chen
  • michal-pichlinski-here
  • andrewche3
  • rutu-b
  • michalzz
  • ameet-openfin
  • jmransegnola
  • marek_openfin
  • yoge-openfin
  • nil.ffej
  • gilesstevenson-openfin
  • eheyder
  • newaz.sharif
  • openfincolinhu
  • openfin-johans
  • alan15008
  • openfin-ci-gh
  • hina-khalid
  • ife-dev1
  • mjosling
  • elliott.burr
  • vsaw3
  • gallak-openfin
  • galim.kaudinov
  • hzhi0209
  • andy.westacott
  • __tomasz__
  • cameronopenfin
  • dhilan
  • davidcoxon-of
  • openfin-jeff
  • gouthamc
  • hannahmcmillen
  • xyopenfin
  • smocarski
  • eugeneross-openfin
  • imansuri
  • manamiueda
  • sakibahmad
  • shahossain
  • openfinbrandon
  • pierrebaize
  • noyangunday
  • michaelmcoates
  • johnmandia-openfin
  • rdepena
  • tgoc99
  • wenjunche
  • harsimran.openfin.singh
  • luiemilio
  • licui3936
  • connormccafferty
  • adam.saland
  • openfin-ci
  • chrishobsonexpero
  • richbrowne-openfin
  • azizyok
  • openfin-gavin
  • oblarg