@triveria/wallet 0.0.289 → 0.0.290

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/auth.js CHANGED
@@ -16,7 +16,7 @@ exports.RequestToken = RequestToken;
16
16
  const axios_1 = __importDefault(require("axios"));
17
17
  function RequestToken(tokenUrl, audience, clientId, clientSecret) {
18
18
  return __awaiter(this, void 0, void 0, function* () {
19
- const body = `{"client_id":"${clientId}","client_secret":"${clientSecret}","audience":"${audience}","grant_type":"client_credentials"}`, headers = { 'content-type': 'application/json' };
19
+ const body = new URLSearchParams({ client_id: clientId, client_secret: clientSecret, audience, grant_type: 'client_credentials' }), headers = { 'content-type': 'application/x-www-form-urlencoded' };
20
20
  const { data: { access_token } } = yield axios_1.default.post(`${tokenUrl}`, body, {
21
21
  headers,
22
22
  });
package/configuration.js CHANGED
@@ -37,8 +37,8 @@ class Configuration {
37
37
  * @return True if the given MIME is JSON, false otherwise.
38
38
  */
39
39
  isJsonMime(mime) {
40
- const jsonMime = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
41
- return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
40
+ const jsonMime = /^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i;
41
+ return mime !== null && jsonMime.test(mime);
42
42
  }
43
43
  }
44
44
  exports.Configuration = Configuration;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@triveria/wallet",
3
3
  "private": false,
4
- "version": "0.0.289",
4
+ "version": "0.0.290",
5
5
  "description": "",
6
6
  "main": "index.js",
7
7
  "scripts": {