From 3e77cd4a69ce307932be080d76e5492059efee4f Mon Sep 17 00:00:00 2001 From: Gerry Tan Date: Thu, 7 Jun 2018 06:29:07 +1000 Subject: [PATCH] Atlassian ASAP auth: default additionalClaims to empty object if not provided. Closes #952. (#953) --- .../app/network/authentication.js | 2 +- packages/insomnia-app/package-lock.json | 48 ++++++++++++++++--- 2 files changed, 42 insertions(+), 8 deletions(-) diff --git a/packages/insomnia-app/app/network/authentication.js b/packages/insomnia-app/app/network/authentication.js index 1e03626877..d7ef30bec9 100644 --- a/packages/insomnia-app/app/network/authentication.js +++ b/packages/insomnia-app/app/network/authentication.js @@ -81,7 +81,7 @@ export async function getAuthHeader ( let parsedAdditionalClaims; try { - parsedAdditionalClaims = JSON.parse(additionalClaims); + parsedAdditionalClaims = JSON.parse(additionalClaims || '{}'); } catch (err) { throw new Error(`Unable to parse additional-claims: ${err}`); } diff --git a/packages/insomnia-app/package-lock.json b/packages/insomnia-app/package-lock.json index 246861d8f5..ce412294d1 100644 --- a/packages/insomnia-app/package-lock.json +++ b/packages/insomnia-app/package-lock.json @@ -10,9 +10,18 @@ "integrity": "sha512-juYJNi8JEpTUWXwz8ssa8Oop4n/kwJ/pIQP22vJAVAe6RTRD+0m+e9LRNnfK2EDaX8uwmUzLNGviFQRD6SxeOw==", "dev": true, "requires": { - "7zip-bin-mac": "1.0.1" + "7zip-bin-linux": "1.3.1", + "7zip-bin-mac": "1.0.1", + "7zip-bin-win": "2.2.0" } }, + "7zip-bin-linux": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/7zip-bin-linux/-/7zip-bin-linux-1.3.1.tgz", + "integrity": "sha512-Wv1uEEeHbTiS1+ycpwUxYNuIcyohU6Y6vEqY3NquBkeqy0YhVdsNUGsj0XKSRciHR6LoJSEUuqYUexmws3zH7Q==", + "dev": true, + "optional": true + }, "7zip-bin-mac": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/7zip-bin-mac/-/7zip-bin-mac-1.0.1.tgz", @@ -20,6 +29,13 @@ "dev": true, "optional": true }, + "7zip-bin-win": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/7zip-bin-win/-/7zip-bin-win-2.2.0.tgz", + "integrity": "sha512-uPHXapEmUtlUKTBx4asWMlxtFUWXzEY0KVEgU7QKhgO2LJzzM3kYxM6yOyUZTtYE6mhK4dDn3FDut9SCQWHzgg==", + "dev": true, + "optional": true + }, "@babel/code-frame": { "version": "7.0.0-beta.44", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0-beta.44.tgz", @@ -445,9 +461,18 @@ "integrity": "sha512-jQiCV8fxW3SPtPnU/BnTEQqawWtBmanCgydzRuzsptFVb/6Q4OKWdB5T3B+XHOf8lqaH89+XeJf6oA1b/QQEnQ==", "dev": true, "requires": { - "app-builder-bin-mac": "1.8.6" + "app-builder-bin-linux": "1.8.6", + "app-builder-bin-mac": "1.8.6", + "app-builder-bin-win": "1.8.6" } }, + "app-builder-bin-linux": { + "version": "1.8.6", + "resolved": "https://registry.npmjs.org/app-builder-bin-linux/-/app-builder-bin-linux-1.8.6.tgz", + "integrity": "sha512-IZSv5Wcz3/OYZENwn3iaTLjDSSVPVFobBiJjUrP3hXeOnitRvB0aI8X5KMFYzfkv7kIhSlyPnRsvNjPqgbjyrw==", + "dev": true, + "optional": true + }, "app-builder-bin-mac": { "version": "1.8.6", "resolved": "https://registry.npmjs.org/app-builder-bin-mac/-/app-builder-bin-mac-1.8.6.tgz", @@ -455,6 +480,13 @@ "dev": true, "optional": true }, + "app-builder-bin-win": { + "version": "1.8.6", + "resolved": "https://registry.npmjs.org/app-builder-bin-win/-/app-builder-bin-win-1.8.6.tgz", + "integrity": "sha512-nlceArzkRtWgqNoif6OFKaAKNNZ3uZuiG+9UkpOPLf/EDoYdeAq4YdvKWaQx1RHsNNfQTx0s/IODvlD0AdUmPA==", + "dev": true, + "optional": true + }, "aproba": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", @@ -9019,6 +9051,13 @@ "insomnia-cookies": "0.0.4", "xmldom": "0.1.27", "xpath": "0.0.27" + }, + "dependencies": { + "xpath": { + "version": "0.0.27", + "resolved": "https://registry.npmjs.org/xpath/-/xpath-0.0.27.tgz", + "integrity": "sha512-fg03WRxtkCV6ohClePNAECYsmpKKTv5L8y/X3Dn1hQrec3POx2jHZ/0P2qQ6HvsrU1BmeqXcof3NGGueG6LxwQ==" + } } }, "internal-ip": { @@ -22305,11 +22344,6 @@ "resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.1.27.tgz", "integrity": "sha1-1QH5ezvbQDr4757MIFcxh6rawOk=" }, - "xpath": { - "version": "0.0.27", - "resolved": "https://registry.npmjs.org/xpath/-/xpath-0.0.27.tgz", - "integrity": "sha512-fg03WRxtkCV6ohClePNAECYsmpKKTv5L8y/X3Dn1hQrec3POx2jHZ/0P2qQ6HvsrU1BmeqXcof3NGGueG6LxwQ==" - }, "xtend": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz",