Previous page

Next page

Locate page in Contents

HTML5 Gateway API

The HTML5 Gateway API allows you to use a custom app launcher to launch published applications and desktops via the RAS HTML5 Gateway.

Note: The HTML5 Client option must be enabled for the RAS Secure Client Gateway in the Parallels RAS Console and the gateway must be reachable on https://server-name/RASHTML5Gateway/ where "server-name" is the name of the host.

Link Format

When calling the following link:

https://server-name/RASHTML5Gateway/?https://webserver.host/app.js#/launch

the RAS HTML5 Gateway will make a request to https://webserver.host/app.js and expect a JSONP formatted response as follows:

_RASHTML5LoadApp ({

    u: 'username',

    q: 'password',

    a: '#3',

    p: 'c:\\temp\\another.txt',

        extra: {

            redirectPrinter: true,

            redirectLinks: true,

            redirectSound: true

        }

});

The RAS HTML5 Gateway will use the received data to launch the app using the options specified in the JSON payload.

Supported JSON parameters

The following table lists currently supported parameters:

Parameter Name

Description

a

Application ID

d

Domain

p

Application arguments

q

Password

u

Username

extra.redirectLinks

Boolean: true = redirect links; false = do not redirect.

extra.redirectPrinter

Boolean: true = redirect printer; false = do not redirect.

extra.redirectSound

Boolean: true = redirect sound; false = do not redirect.

Launching remote applications and desktops

The following steps describe how to use the API to launch remote applications and desktop:

  1. You build a web application that knows about every user. The application is hosted on "webserver.host" and accepts requests on various "app.js" paths.
  2. Parallels HTML5 Client is hosted on "server-name": https://server-name/RASHTML5Gateway.
  3. From your portal, Parallels HTML5 Client is started in a new tab of the user's web browser using this link: https://server-name/RASHTML5Gateway/?https://webserver.host/app.js#/launch.
  4. The link loads Parallels HTML5 Client. The first thing that client does is, it connects to https://webserver.host/app.js and expects a JSON reply containing user credentials and remote connection settings:

    RASHTML5LoadApp ({ u: 'username', q: 'password', a: '#3', p: 'c:\\temp\\another.txt', extra: { redirectPrinter: true, redirectLinks: true, redirectSound: true } });

    where:

    • a: '#3' is a publishing ID.
    • p: is a parameter to start the app with.
    • app.js is a way to pass all necessary parameters to your web application. It should be dynamically generated for every user and every application they have access to through your portal. For example,  notepad_3_username-user123.js.