Backplane – Add to Your Application

Contents

Overview

These instructions are for application developers adding Backplane functionality to a standalone application or a web application (as opposed to a website). Once implemented, your element or web app will be configured to listen to a Backplane Server, and can be deployed in any Backplane-enabled site.

Integration Flow

  1. Obtain authentication credentials for your specific bus.
  2. Set up the application to listen for Backplane messages.
  3. Implement a logout.

Integration Instructions

1. Obtain authentication credentials for your specific bus

In the Dashboard, these values are listed as backplane_password and backplane_bus. Copy these values to a text file (or write them down)—you will need them later.

2. Set up the application to listen to Backplane messages

The following code example is used to listen to the Backplane channel—add it to the existing application code.

The example listens for the Backplane identity/login event, which you can use with User Registration’s entity.find API call to get the full profile data. Make sure to use your client_id and client_secret for this call.

3. Retrieve user profile data (Registration only)

When you receive a Backplane event, you’ll want to use the uuid from the event to retrieve the rest of the Janrain profile information. We’ve included a JavaScript example (for client-side) which calls the PHP example (for server-side). At this point, the variable profile will contain the information you need to authenticate the user for your app.

Client-side (JavaScript):

Server-side (PHP):

4. Implement a logout

One way to handle a logout is to close the channel when it’s no longer needed. This is typically done on user sign-out.

Close a channel by opening a new one to take its place.

Another way to handle a logout is to send a logout message on the current bus. For example, instead of changing the channel on logout, you could publish an identity/logout message on the channel.