Plugin interface

Device Connector plugins are always run in the context of the user running the browser. The plugin interface uses standard input and standard output to communicate with the plugin. This allows the plugin to be implemented in virtually any language. The plugin must be provided as a command line executable for the desired target platform.

Currently, only Windows is supported.

The plugin executable specified in the plugin configuration file is run once for each request. It receives the request on standard input and writes the response to standard output. The plugin executable should not write to standard error as standard error may not exist.

The plugin shall consume its entire input before writing any output.

Plugins use JSON objects for input and output values. Plugins are defined by the action that they perform. The action-specific input and output objects are defined in the JSON documentation of the single plugin actions.

As return value for an error condition the plugins shall return a JSON object like this:

{ "error" : { "code":<int>, "message":<string> } }

The value of "message" is a more or less human-readable error message in English.

The following error codes for "code" are defined:

  • 100 General error
  • 102 Invalid JSON data
  • 103 Invalid parameters

The currently supported plugin is signDocument. See Plugin action.