diff --git a/README.md b/README.md index 5d0c55335e07c3231dd678118f7a99daa6e1b62c..0d6e0f23d9a59520a26b56bdeb9d014079686bee 100644 --- a/README.md +++ b/README.md @@ -92,6 +92,10 @@ The topics have the following structure: ``` project.operator.vehicleType.vehicleID.[send|receive].messageType +# eg +soar.noc.autosub.ah1.send.platform-mission +# or +soar.po.ecosub.eco1.receive.platform-status ``` Subscriptions may contain single-word wildcards (*) or multi-word wildcards (#). diff --git a/dist/adapter.esm.js b/dist/adapter.esm.js index d1375d79711b391d24dd4a450e40e7c39679edcb..1acacf6021bc972b749333ab265f96c0e9d3401f 100644 --- a/dist/adapter.esm.js +++ b/dist/adapter.esm.js @@ -47,7 +47,7 @@ class Adapter { if (!this.tokenValid()) return this.auth().then((response) => { return { - Authorization: `Bearer ${this.credentials.token}`, + Authorization: `Bearer ${response.data.token}`, }; }); else { diff --git a/dist/adapter.js b/dist/adapter.js index 8471c08bd7c2e6e46adc4b88bd58d89c6f25865d..c868d51b5627423752f33dc107e47e0a45c1a6f9 100644 --- a/dist/adapter.js +++ b/dist/adapter.js @@ -49,7 +49,7 @@ class Adapter { if (!this.tokenValid()) return this.auth().then((response) => { return { - Authorization: `Bearer ${this.credentials.token}`, + Authorization: `Bearer ${response.data.token}`, }; }); else { diff --git a/dist/protocol.esm.js b/dist/protocol.esm.js index 15771880cb0907e6d5c2ffd811f243171a508537..3971ac0d7eaefbf8ce14623624c8de48e3b1d9bc 100644 --- a/dist/protocol.esm.js +++ b/dist/protocol.esm.js @@ -59,6 +59,9 @@ class GenericProtocol { /** * Invoked on receiving a message from the backbone + * + * Whilst type isn't used in the generic stub it will + * be needed by sub-classes overriding the decode method * @param {string} type * @param {object} message * @returns {*} @@ -69,6 +72,9 @@ class GenericProtocol { /** * Optionally invoked before delivering a message to the backbone + * + * Whilst type isn't used in the generic stub it will + * be needed by sub-classes overriding the encode method * @param {string} type * @param {*} message * @returns {object} diff --git a/dist/protocol.js b/dist/protocol.js index 772a3cab757cf35be46157f9e656bcfc437f1e80..6d8c468511c78e84c6c42b8aa36f762f8f27fbaf 100644 --- a/dist/protocol.js +++ b/dist/protocol.js @@ -61,6 +61,9 @@ class GenericProtocol { /** * Invoked on receiving a message from the backbone + * + * Whilst type isn't used in the generic stub it will + * be needed by sub-classes overriding the decode method * @param {string} type * @param {object} message * @returns {*} @@ -71,6 +74,9 @@ class GenericProtocol { /** * Optionally invoked before delivering a message to the backbone + * + * Whilst type isn't used in the generic stub it will + * be needed by sub-classes overriding the encode method * @param {string} type * @param {*} message * @returns {object} diff --git a/src/adapter/index.js b/src/adapter/index.js index b4dc835da3d6987198bd2ae3e185a4bef200efec..d52101f3481d34171356716313f2cee1417632b2 100644 --- a/src/adapter/index.js +++ b/src/adapter/index.js @@ -47,7 +47,7 @@ export class Adapter { if (!this.tokenValid()) return this.auth().then((response) => { return { - Authorization: `Bearer ${this.credentials.token}`, + Authorization: `Bearer ${response.data.token}`, }; }); else { diff --git a/src/protocol/index.js b/src/protocol/index.js index bb67711ad44e1892e5b2c5aa0e1c5e8d765b21ce..266542c20803fe75780fd22836ff59e2957cfc7d 100644 --- a/src/protocol/index.js +++ b/src/protocol/index.js @@ -59,6 +59,9 @@ export class GenericProtocol { /** * Invoked on receiving a message from the backbone + * + * Whilst type isn't used in the generic stub it will + * be needed by sub-classes overriding the decode method * @param {string} type * @param {object} message * @returns {*} @@ -69,6 +72,9 @@ export class GenericProtocol { /** * Optionally invoked before delivering a message to the backbone + * + * Whilst type isn't used in the generic stub it will + * be needed by sub-classes overriding the encode method * @param {string} type * @param {*} message * @returns {object}