Connectivity to io.Manager
Overview
io.Connect Browser projects can connect to io.Manager and use its functionalities.
io.Manager is a server-side app that provides data to io.Connect (apps, Layouts, preferences) and allows monitoring and interacting with users running io.Connect.
It also includes an Admin UI that helps managing the data stored in io.Manager easier.
For more details about io.Manager, see the io.Manager documentation.
Currently, the @interopio/browser-platform
library allows:
opening a session and authenticating with io.Manager - both basic and token-based authentication mechanisms are supported. You can also provide custom headers to be included in every request;
fetching app definitions and Layouts and importing them into the current io.Connect Browser environment;
Setup
to io.Manager from an io.Connect Browser project requires modifying the configuration for initializing the @interopio/browser-platform
library in the Main app.
To specify settings for the connection to io.Manager, use the manager
property of the configuration object when initializing the @interopio/browser-platform
library. The following example demonstrates configuring the connection to io.Manager with Basic authentication:
import IOBrowserPlatform from "@interopio/browser-platform";
const config = {
licenseKey: "my-license-key",
manager: {
// URL pointing to io.Manager.
url: "https://my-io-manager.com:4242/api",
// Basic authentication.
auth: {
basic: {
username: "username",
password: "password"
}
},
fetchIntervalMS: 10000,
tokenRefreshIntervalMS: 15000,
critical: true
}
};
const { io } = await IOBrowserPlatform(config);
The manager
object has the following properties:
Property | Type | Description |
---|---|---|
auth |
object |
Required. User authentication configuration. |
critical |
boolean |
If true , the @interopio/browser-platform library will wait for this module to be fully operational before completing its initialization. Defaults to false . |
fetchIntervalMS |
number |
Interval in milliseconds at which a new snapshot of app definitions and Layouts will be fetched from io.Manager. Defaults to 60000 . |
headers |
object |
Object containing key/value pairs of headers to be sent with every request. |
tokenRefreshIntervalMS |
number |
Interval in milliseconds at which the session token will be refreshed. Defaults to 3600000 . |
url |
string |
Required. URL pointing to io.Manager. |
The auth
object has the following properties:
Property | Type | Description |
---|---|---|
basic |
object |
Object with required username and password properties for Basic authentication. |
username |
string |
Username for authentication. |
token |
object |
Object with an optional bearer property holding an authentication token used in Auth0 authentication. |