@boxyhq/saml-jackson 1.3.1 → 1.3.2
Sign up to get free protection for your applications and to get access to all the features.
package/dist/controller/oauth.js
CHANGED
@@ -100,11 +100,12 @@ class OAuthController {
|
|
100
100
|
else if (this.opts.idpDiscoveryPath) {
|
101
101
|
if (!isIdpFlow) {
|
102
102
|
// redirect to IdP selection page
|
103
|
-
const idpList = connections.map(({ idpMetadata, oidcProvider, clientID }) => {
|
103
|
+
const idpList = connections.map(({ idpMetadata, oidcProvider, clientID, name }) => {
|
104
104
|
var _a;
|
105
105
|
return JSON.stringify({
|
106
106
|
provider: (_a = idpMetadata === null || idpMetadata === void 0 ? void 0 : idpMetadata.provider) !== null && _a !== void 0 ? _a : oidcProvider === null || oidcProvider === void 0 ? void 0 : oidcProvider.provider,
|
107
107
|
clientID,
|
108
|
+
name,
|
108
109
|
connectionIsSAML: idpMetadata && typeof idpMetadata === 'object',
|
109
110
|
connectionIsOIDC: oidcProvider && typeof oidcProvider === 'object',
|
110
111
|
});
|
package/dist/loadConnection.js
CHANGED
@@ -34,16 +34,22 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
34
34
|
Object.defineProperty(exports, "__esModule", { value: true });
|
35
35
|
const fs = __importStar(require("fs"));
|
36
36
|
const path = __importStar(require("path"));
|
37
|
+
const url = __importStar(require("url"));
|
37
38
|
const loadConnection = (preLoadedConnection) => __awaiter(void 0, void 0, void 0, function* () {
|
38
39
|
if (preLoadedConnection.startsWith('./')) {
|
39
40
|
preLoadedConnection = path.resolve(process.cwd(), preLoadedConnection);
|
40
41
|
}
|
42
|
+
else {
|
43
|
+
preLoadedConnection = path.resolve(preLoadedConnection);
|
44
|
+
}
|
41
45
|
const files = yield fs.promises.readdir(preLoadedConnection);
|
42
46
|
const connections = [];
|
43
47
|
for (const idx in files) {
|
44
48
|
const file = files[idx];
|
45
49
|
if (file.endsWith('.js')) {
|
46
|
-
const
|
50
|
+
const filePath = path.join(preLoadedConnection, file);
|
51
|
+
const fileUrl = preLoadedConnection.startsWith('/') ? filePath : url.pathToFileURL(filePath).toString();
|
52
|
+
const { default: connection, } = yield Promise.resolve().then(() => __importStar(require(/* webpackIgnore: true */ fileUrl)));
|
47
53
|
if (!('oidcDiscoveryUrl' in connection)) {
|
48
54
|
const rawMetadata = yield fs.promises.readFile(path.join(preLoadedConnection, path.parse(file).name + '.xml'), 'utf8');
|
49
55
|
connection.encodedRawMetadata = Buffer.from(rawMetadata, 'utf8').toString('base64');
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@boxyhq/saml-jackson",
|
3
|
-
"version": "1.3.
|
3
|
+
"version": "1.3.2",
|
4
4
|
"description": "SAML Jackson library",
|
5
5
|
"keywords": [
|
6
6
|
"SAML 2.0"
|
@@ -38,13 +38,13 @@
|
|
38
38
|
"statements": 70
|
39
39
|
},
|
40
40
|
"dependencies": {
|
41
|
-
"@boxyhq/saml20": "1.0.
|
41
|
+
"@boxyhq/saml20": "1.0.11",
|
42
42
|
"@opentelemetry/api": "1.0.4",
|
43
43
|
"@opentelemetry/api-metrics": "0.27.0",
|
44
|
-
"axios": "1.1.
|
45
|
-
"jose": "4.10.
|
44
|
+
"axios": "1.1.3",
|
45
|
+
"jose": "4.10.3",
|
46
46
|
"marked": "4.1.1",
|
47
|
-
"mongodb": "4.
|
47
|
+
"mongodb": "4.11.0",
|
48
48
|
"mysql2": "2.3.3",
|
49
49
|
"openid-client": "5.1.10",
|
50
50
|
"node-forge": "1.3.1",
|
@@ -57,14 +57,14 @@
|
|
57
57
|
"xmlbuilder": "15.1.1"
|
58
58
|
},
|
59
59
|
"devDependencies": {
|
60
|
-
"@faker-js/faker": "7.
|
61
|
-
"@types/node": "18.
|
60
|
+
"@faker-js/faker": "7.6.0",
|
61
|
+
"@types/node": "18.11.5",
|
62
62
|
"@types/sinon": "10.0.13",
|
63
63
|
"@types/tap": "15.0.7",
|
64
64
|
"@typescript-eslint/eslint-plugin": "5.40.0",
|
65
|
-
"@typescript-eslint/parser": "5.
|
65
|
+
"@typescript-eslint/parser": "5.41.0",
|
66
66
|
"cross-env": "7.0.3",
|
67
|
-
"eslint": "8.
|
67
|
+
"eslint": "8.26.0",
|
68
68
|
"eslint-config-prettier": "8.5.0",
|
69
69
|
"prettier": "2.7.1",
|
70
70
|
"sinon": "14.0.1",
|