Connects this device with its corresponding CA.
Properties:
{tokenFile: string, appProtocol: string, appPublisher: string,
appLocalName: string, appSuffix: string, session: string}
where:
tokenFile
: the name of a file containing an authentication token.appProtocol
: protocol to contact the CA, e.g.,https
.appPublisher
: the publisher of this app.appLocalName
: the local name of the app.appSuffix
: the URL suffix, e.g.,cafjs.com
.session
: The persistent session identifier.
- Source:
Extends
Methods
getMethodArgs(msg) → {Array.<jsonType>}
- Source:
Gets original method arguments from message.
Parameters:
Name | Type | Description |
---|---|---|
msg |
msgType | A message |
Throws:
-
when invalid message.
- Type
- Error
Returns:
An array with method arguments.
- Type
- Array.<jsonType>
registerHandler(handler)
- Source:
Registers a handler to process messages.
This is equivalent to that.cli.onmessage = handler
Parameters:
Name | Type | Description |
---|---|---|
handler |
function | A function of type
|