From 51910eb894919d64c03951bc3d9238423f127c37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Do=C4=9Fan=20Eri=C5=9Fen?= Date: Mon, 26 Jun 2023 22:33:25 -0700 Subject: [PATCH 01/18] update dep file path --- .../1-sign-in/App/package-lock.json | 731 +++++++++--------- 1-Authentication/1-sign-in/App/package.json | 2 +- .../2-sign-in-b2c/App/package-lock.json | 2 +- .../2-sign-in-b2c/App/package.json | 2 +- .../1-call-graph/App/package-lock.json | 2 +- 2-Authorization/1-call-graph/App/package.json | 2 +- 3-Deployment/App/package.json | 2 +- .../1-app-roles/App/package-lock.json | 2 +- 4-AccessControl/1-app-roles/App/package.json | 2 +- .../2-security-groups/App/package-lock.json | 2 +- .../2-security-groups/App/package.json | 2 +- 11 files changed, 369 insertions(+), 382 deletions(-) diff --git a/1-Authentication/1-sign-in/App/package-lock.json b/1-Authentication/1-sign-in/App/package-lock.json index 6180ad0..6b3cfd9 100644 --- a/1-Authentication/1-sign-in/App/package-lock.json +++ b/1-Authentication/1-sign-in/App/package-lock.json @@ -13,7 +13,7 @@ "ejs": "^3.1.8", "express": "^4.18.1", "express-session": "^1.17.3", - "msal-node-wrapper": "file:../../../common/msal-node-wrapper" + "msal-node-wrapper": "file:../../../Common/msal-node-wrapper" }, "devDependencies": { "jest": "^27.0.6", @@ -21,7 +21,7 @@ "supertest": "^6.1.4" } }, - "../../../common/msal-node-wrapper": { + "../../../Common/msal-node-wrapper": { "version": "1.0.0-beta", "license": "MIT", "dependencies": { @@ -58,51 +58,16 @@ "node": "16 || 18 || 20" } }, - "../../../shared/msal-node-wrapper": { - "version": "1.0.0-beta", - "extraneous": true, - "license": "MIT", - "dependencies": { - "@azure/msal-node": "^1.17.3", - "axios": "^0.27.2", - "express": "^4.18.2", - "express-session": "^1.17.3" - }, - "devDependencies": { - "@rollup/plugin-node-resolve": "^15.0.1", - "@rollup/plugin-typescript": "^11.0.0", - "@types/express": "^4.17.13", - "@types/express-session": "^1.17.4", - "@types/jest": "^25.2.3", - "@types/node": "^13.13.4", - "@types/sinon": "^10.0.14", - "@typescript-eslint/eslint-plugin": "^5.54.1", - "@typescript-eslint/parser": "^5.54.1", - "eslint": "^8.35.0", - "eslint-plugin-header": "^3.1.1", - "eslint-plugin-import": "^2.27.5", - "eslint-plugin-security": "^1.7.1", - "husky": "^6.0.0", - "jest": "^29.5.0", - "rollup": "^3.20.1", - "sinon": "^15.0.4", - "supertest": "^6.1.6", - "ts-jest": "^29.0.5", - "tslib": "^1.10.0", - "typedoc": "^0.23.28", - "typescript": "^4.9.5" - }, - "engines": { - "node": "16 || 18 || 20" - } + "../../Common/msal-node-wrapper": { + "extraneous": true }, "node_modules/@ampproject/remapping": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", - "integrity": "sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", + "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==", "dev": true, "dependencies": { - "@jridgewell/gen-mapping": "^0.1.0", + "@jridgewell/gen-mapping": "^0.3.0", "@jridgewell/trace-mapping": "^0.3.9" }, "engines": { @@ -183,15 +148,6 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, - "node_modules/@babel/core/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, "node_modules/@babel/generator": { "version": "7.22.5", "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.22.5.tgz", @@ -207,20 +163,6 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/generator/node_modules/@jridgewell/gen-mapping": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", - "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", - "dev": true, - "dependencies": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/@babel/helper-compilation-targets": { "version": "7.22.5", "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.5.tgz", @@ -240,30 +182,6 @@ "@babel/core": "^7.0.0" } }, - "node_modules/@babel/helper-compilation-targets/node_modules/lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "dependencies": { - "yallist": "^3.0.2" - } - }, - "node_modules/@babel/helper-compilation-targets/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/@babel/helper-compilation-targets/node_modules/yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true - }, "node_modules/@babel/helper-environment-visitor": { "version": "7.22.5", "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.5.tgz", @@ -330,9 +248,9 @@ } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.19.0.tgz", - "integrity": "sha512-40Ryx7I8mT+0gaNxm8JGTZFUITNqdLAgdg0hXzeVZxVD6nFsdhQvip6v8dqkRHzsz1VFpFAaOCHNn0vKBL7Czw==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz", + "integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==", "dev": true, "engines": { "node": ">=6.9.0" @@ -458,6 +376,15 @@ "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", "dev": true }, + "node_modules/@babel/highlight/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, "node_modules/@babel/highlight/node_modules/has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", @@ -639,12 +566,12 @@ } }, "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.18.6.tgz", - "integrity": "sha512-mAWAuq4rvOepWCBid55JuRNvpTNf2UGVgoz4JV0fXEKolsVZDzsa4NqCef758WZJj/GDu0gVGItjKFiClTAmZA==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.22.5.tgz", + "integrity": "sha512-1mS2o03i7t1c6VzH6fdQ3OA8tcEIxwG18zIPRp+UY1Ihv6W+XZzBCVxExF9upussPXJ0xE9XRHwMoNs1ep/nRQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -997,13 +924,14 @@ } }, "node_modules/@jridgewell/gen-mapping": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz", - "integrity": "sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==", + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", + "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", "dev": true, "dependencies": { - "@jridgewell/set-array": "^1.0.0", - "@jridgewell/sourcemap-codec": "^1.4.10" + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" }, "engines": { "node": ">=6.0.0" @@ -1028,25 +956,31 @@ } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", "dev": true }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.17", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz", - "integrity": "sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g==", + "version": "0.3.18", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz", + "integrity": "sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==", "dev": true, "dependencies": { "@jridgewell/resolve-uri": "3.1.0", "@jridgewell/sourcemap-codec": "1.4.14" } }, + "node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", + "dev": true + }, "node_modules/@sinonjs/commons": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", - "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", + "version": "1.8.6", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.6.tgz", + "integrity": "sha512-Ky+XkAkqPZSm3NLBeUng77EBQl3cmeJhITaGHdYH8kjVB+aun3S4XBRti2zt17mtt0mIUDiNxYeoJm6drVvBJQ==", "dev": true, "dependencies": { "type-detect": "4.0.8" @@ -1061,14 +995,23 @@ "@sinonjs/commons": "^1.7.0" } }, + "node_modules/@tootallnate/once": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", + "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, "node_modules/@types/babel__core": { - "version": "7.1.19", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.19.tgz", - "integrity": "sha512-WEOTgRsbYkvA/KCsDwVEGkd7WAr1e3g31VHQ8zy5gul/V1qKullU/BU5I68X5v7V3GnB9eotmom4v5a5gjxorw==", + "version": "7.20.1", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.1.tgz", + "integrity": "sha512-aACu/U/omhdk15O4Nfb+fHgH/z3QsfQzpnvRZhYhThms83ZnAOZz7zZAWO7mn2yyNQaA4xTO8GLK3uqFU4bYYw==", "dev": true, "dependencies": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0", + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", "@types/babel__generator": "*", "@types/babel__template": "*", "@types/babel__traverse": "*" @@ -1094,18 +1037,18 @@ } }, "node_modules/@types/babel__traverse": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.18.2.tgz", - "integrity": "sha512-FcFaxOr2V5KZCviw1TnutEMVUVsGt4D2hP1TAfXZAMKuHYW3xQhe3jTxNPWutgCJ3/X1c5yX8ZoGVEItxKbwBg==", + "version": "7.20.1", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.1.tgz", + "integrity": "sha512-MitHFXnhtgwsGZWtT68URpOvLN4EREih1u3QtQiN4VdAxWKRVvGCSvw/Qth0M0Qq3pJpnGOu5JaM/ydK7OGbqg==", "dev": true, "dependencies": { - "@babel/types": "^7.3.0" + "@babel/types": "^7.20.7" } }, "node_modules/@types/graceful-fs": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.5.tgz", - "integrity": "sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw==", + "version": "4.1.6", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.6.tgz", + "integrity": "sha512-Sig0SNORX9fdW+bQuTEovKj3uHcUL6LQKbCrrqb1X7J6/ReAbhCXRAhc+SMejhLELFj2QcyuxmUooZ4bt5ReSw==", "dev": true, "dependencies": { "@types/node": "*" @@ -1136,15 +1079,15 @@ } }, "node_modules/@types/node": { - "version": "18.11.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.3.tgz", - "integrity": "sha512-fNjDQzzOsZeKZu5NATgXUPsaFaTxeRgFXoosrHivTl8RGeV733OLawXsGfEk9a8/tySyZUyiZ6E8LcjPFZ2y1A==", + "version": "20.3.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.3.2.tgz", + "integrity": "sha512-vOBLVQeCQfIcF/2Y7eKFTqrMnizK5lRNQ7ykML/5RuwVXVWxYkgwS7xbt4B6fKCUPgbSL5FSsjHQpaGQP/dQmw==", "dev": true }, "node_modules/@types/prettier": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.1.tgz", - "integrity": "sha512-ri0UmynRRvZiiUJdiz38MmIblKK+oH30MztdBVR95dv/Ubw6neWSb8u1XpRb72L4qsZOhz+L+z9JD40SJmfWow==", + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.3.tgz", + "integrity": "sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA==", "dev": true }, "node_modules/@types/stack-utils": { @@ -1154,9 +1097,9 @@ "dev": true }, "node_modules/@types/yargs": { - "version": "16.0.4", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.4.tgz", - "integrity": "sha512-T8Yc9wt/5LbJyCaLiHPReJa0kApcIgJ7Bn735GjItUfh08Z1pJvu8QZqb9s+mMvKV6WUQRV7K2R46YbjMXTTJw==", + "version": "16.0.5", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.5.tgz", + "integrity": "sha512-AxO/ADJOBFJScHbWhq2xAhlWP24rY4aCEG/NFaMvbT3X2MgRsLjhjQwsn0Zi5zn0LG9jUhCCZMeX9Dkuw6k+vQ==", "dev": true, "dependencies": { "@types/yargs-parser": "*" @@ -1193,9 +1136,9 @@ } }, "node_modules/acorn": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", - "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.9.0.tgz", + "integrity": "sha512-jaVNAFBHNLXspO543WnNNPZFRtavh3skAkITqD0/2aeMkKZTN+254PyhwxFYrk3vQ1xfY+2wbesJMs/JC8/PwQ==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -1309,9 +1252,9 @@ } }, "node_modules/anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "dev": true, "dependencies": { "normalize-path": "^3.0.0", @@ -1501,11 +1444,12 @@ } }, "node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dependencies": { - "balanced-match": "^1.0.0" + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, "node_modules/braces": { @@ -1527,9 +1471,9 @@ "dev": true }, "node_modules/browserslist": { - "version": "4.21.4", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.4.tgz", - "integrity": "sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw==", + "version": "4.21.9", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.9.tgz", + "integrity": "sha512-M0MFoZzbUrRU4KNfCrDLnvyE7gub+peetoTid3TBIqtunaDJyXlwhakT+/VkvSXcfIzFfK/nkCs4nmyTmxdNSg==", "dev": true, "funding": [ { @@ -1539,13 +1483,17 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ], "dependencies": { - "caniuse-lite": "^1.0.30001400", - "electron-to-chromium": "^1.4.251", - "node-releases": "^2.0.6", - "update-browserslist-db": "^1.0.9" + "caniuse-lite": "^1.0.30001503", + "electron-to-chromium": "^1.4.431", + "node-releases": "^2.0.12", + "update-browserslist-db": "^1.0.11" }, "bin": { "browserslist": "cli.js" @@ -1608,9 +1556,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001422", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001422.tgz", - "integrity": "sha512-hSesn02u1QacQHhaxl/kNMZwqVG35Sz/8DgvmgedxSH8z9UUpcDYSPYgsj3x5dQNRcNp6BwpSfQfVzYUTm+fog==", + "version": "1.0.30001508", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001508.tgz", + "integrity": "sha512-sdQZOJdmt3GJs1UMNpCCCyeuS2IEGLXnHyAo9yIO5JJDjbjoVRij4M1qep6P6gFpptD1PqIYgzM+gwJbOi92mw==", "dev": true, "funding": [ { @@ -1620,6 +1568,10 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ] }, @@ -1675,15 +1627,24 @@ } }, "node_modules/ci-info": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.5.0.tgz", - "integrity": "sha512-yH4RezKOGlOhxkmhbeNuC4eYZKAUsEaGtBuBzDDP1eFUKiccDWzBABxBfOx31IDwDIXMTxWuwAxUGModvkbuVw==", - "dev": true + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz", + "integrity": "sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "engines": { + "node": ">=8" + } }, "node_modules/cjs-module-lexer": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz", - "integrity": "sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz", + "integrity": "sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ==", "dev": true }, "node_modules/cliui": { @@ -1764,9 +1725,9 @@ } }, "node_modules/content-type": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", "engines": { "node": ">= 0.6" } @@ -1856,15 +1817,10 @@ "ms": "2.0.0" } }, - "node_modules/debug/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" - }, "node_modules/decimal.js": { - "version": "10.4.2", - "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.2.tgz", - "integrity": "sha512-ic1yEvwT6GuvaYwBLLY6/aFFgjZdySKTE8en/fkU3QICTmRtgtSlFn0u0BXN06InZwtfCelR7j8LRiDI/02iGA==", + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz", + "integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==", "dev": true }, "node_modules/dedent": { @@ -1880,9 +1836,9 @@ "dev": true }, "node_modules/deepmerge": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", - "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", "dev": true, "engines": { "node": ">=0.10.0" @@ -1969,9 +1925,9 @@ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" }, "node_modules/ejs": { - "version": "3.1.8", - "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.8.tgz", - "integrity": "sha512-/sXZeMlhS0ArkfX2Aw780gJzXSMPnKjtspYZv+f3NiKLlubezAHDU5+9xz6gd3/NhG3txQCo6xlglmTS+oTGEQ==", + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.9.tgz", + "integrity": "sha512-rC+QVNMJWv+MtPgkt0y+0rVEIdbtxVADApW9JXrUVlzHetgcyczP/E7DJmWJ4fJCZF2cPcBk0laWO9ZHMG3DmQ==", "dependencies": { "jake": "^10.8.5" }, @@ -1983,9 +1939,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.284", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.284.tgz", - "integrity": "sha512-M8WEXFuKXMYMVr45fo8mq0wUrrJHheiKZf6BArTKk9ZBYCKJEOU5H8cdWgDT+qCVZf7Na4lVUaZsA+h6uA9+PA==", + "version": "1.4.441", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.441.tgz", + "integrity": "sha512-LlCgQ8zgYZPymf5H4aE9itwiIWH4YlCiv1HFLmmcBeFYi5E+3eaIFnjHzYtcFQbaKfAW+CqZ9pgxo33DZuoqPg==", "dev": true }, "node_modules/emittery": { @@ -2038,12 +1994,12 @@ "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" }, "node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", "dev": true, "engines": { - "node": ">=0.8.0" + "node": ">=8" } }, "node_modules/escodegen": { @@ -2256,10 +2212,18 @@ "minimatch": "^5.0.1" } }, + "node_modules/filelist/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, "node_modules/filelist/node_modules/minimatch": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.0.tgz", - "integrity": "sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg==", + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -2310,9 +2274,9 @@ } }, "node_modules/form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", + "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", "dev": true, "dependencies": { "asynckit": "^0.4.0", @@ -2324,9 +2288,9 @@ } }, "node_modules/formidable": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/formidable/-/formidable-2.1.1.tgz", - "integrity": "sha512-0EcS9wCFEzLvfiks7omJ+SiYJAiD+TzK4Pcw1UlUoGnhUxDcMKjt0P7x8wEb0u6OHu8Nb98WG3nxtlF5C7bvUQ==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/formidable/-/formidable-2.1.2.tgz", + "integrity": "sha512-CM3GuJ57US06mlpQ47YcunuUZ9jpm8Vx+P2CGt2j7HpgkKZO/DJYQ0Bobim8G6PFQmK5lOqOOdUXboU+h73A4g==", "dev": true, "dependencies": { "dezalgo": "^1.0.4", @@ -2398,12 +2362,13 @@ } }, "node_modules/get-intrinsic": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz", - "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", "dependencies": { "function-bind": "^1.1.1", "has": "^1.0.3", + "has-proto": "^1.0.1", "has-symbols": "^1.0.3" }, "funding": { @@ -2473,9 +2438,9 @@ } }, "node_modules/graceful-fs": { - "version": "4.2.10", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "dev": true }, "node_modules/has": { @@ -2497,6 +2462,17 @@ "node": ">=8" } }, + "node_modules/has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/has-symbols": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", @@ -2550,6 +2526,43 @@ "node": ">= 0.8" } }, + "node_modules/http-proxy-agent": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", + "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", + "dev": true, + "dependencies": { + "@tootallnate/once": "1", + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/http-proxy-agent/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/http-proxy-agent/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, "node_modules/https-proxy-agent": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", @@ -2682,9 +2695,9 @@ } }, "node_modules/is-core-module": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", - "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", + "version": "2.12.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.1.tgz", + "integrity": "sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==", "dev": true, "dependencies": { "has": "^1.0.3" @@ -2796,15 +2809,6 @@ "node": ">=8" } }, - "node_modules/istanbul-lib-instrument/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, "node_modules/istanbul-lib-report": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", @@ -2870,14 +2874,14 @@ } }, "node_modules/jake": { - "version": "10.8.5", - "resolved": "https://registry.npmjs.org/jake/-/jake-10.8.5.tgz", - "integrity": "sha512-sVpxYeuAhWt0OTWITwT98oyV0GsXyMlXCF+3L1SuafBVUIr/uILGRB+NqwkzhgXKvoJpDIpQvqkUALgdmQsQxw==", + "version": "10.8.7", + "resolved": "https://registry.npmjs.org/jake/-/jake-10.8.7.tgz", + "integrity": "sha512-ZDi3aP+fG/LchyBzUM804VjddnwfSfsdeYkwt8NcbKRvo4rFkjhs456iLFn3k2ZUWvNe4i48WACDbza8fhq2+w==", "dependencies": { "async": "^3.2.3", "chalk": "^4.0.2", - "filelist": "^1.0.1", - "minimatch": "^3.0.4" + "filelist": "^1.0.4", + "minimatch": "^3.1.2" }, "bin": { "jake": "bin/cli.js" @@ -3235,9 +3239,9 @@ } }, "node_modules/jest-pnp-resolver": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz", - "integrity": "sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", + "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", "dev": true, "engines": { "node": ">=6" @@ -3406,6 +3410,18 @@ "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, + "node_modules/jest-snapshot/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/jest-snapshot/node_modules/semver": { "version": "7.5.3", "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz", @@ -3421,6 +3437,12 @@ "node": ">=10" } }, + "node_modules/jest-snapshot/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, "node_modules/jest-util": { "version": "27.5.1", "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-27.5.1.tgz", @@ -3515,9 +3537,9 @@ } }, "node_modules/jquery": { - "version": "3.6.4", - "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.4.tgz", - "integrity": "sha512-v28EW9DWDFpzcD9O5iyJXg3R3+q+mET5JhnjJzQUZMHOv67bpSIHq81GEYpPNZHG+XXHsfSme3nxp/hndKEcsQ==", + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.7.0.tgz", + "integrity": "sha512-umpJ0/k8X0MvD1ds0P9SfowREz2LenHsQaxSohMZ5OMNEU2r0tf8pdeEFTHMFxWVxKNyU9rTtK3CWzUCTKJUeQ==", "peer": true }, "node_modules/js-tokens": { @@ -3585,66 +3607,6 @@ } } }, - "node_modules/jsdom/node_modules/@tootallnate/once": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", - "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", - "dev": true, - "engines": { - "node": ">= 6" - } - }, - "node_modules/jsdom/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/jsdom/node_modules/form-data": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", - "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", - "dev": true, - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/jsdom/node_modules/http-proxy-agent": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", - "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", - "dev": true, - "dependencies": { - "@tootallnate/once": "1", - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/jsdom/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, "node_modules/jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", @@ -3731,15 +3693,12 @@ "dev": true }, "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", "dev": true, "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" + "yallist": "^3.0.2" } }, "node_modules/make-dir": { @@ -3757,15 +3716,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/make-dir/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, "node_modules/makeerror": { "version": "1.0.12", "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", @@ -3865,22 +3815,13 @@ "node": "*" } }, - "node_modules/minimatch/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, "node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, "node_modules/msal-node-wrapper": { - "resolved": "../../../common/msal-node-wrapper", + "resolved": "../../../Common/msal-node-wrapper", "link": true }, "node_modules/natural-compare": { @@ -3904,9 +3845,9 @@ "dev": true }, "node_modules/node-releases": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz", - "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==", + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.12.tgz", + "integrity": "sha512-QzsYKWhXTWx8h1kIvqfnC++o0pEmpRQA/aenALsL2F4pqNVr7YzcdMlDij5WBnwftRbJCNJL/O7zdKaxKPHqgQ==", "dev": true }, "node_modules/nodemon": { @@ -3955,6 +3896,21 @@ "node": ">=4" } }, + "node_modules/nodemon/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, + "node_modules/nodemon/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, "node_modules/nodemon/node_modules/supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -4004,15 +3960,15 @@ } }, "node_modules/nwsapi": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.2.tgz", - "integrity": "sha512-90yv+6538zuvUMnN+zCr8LuV6bPFdq50304114vJYJ8RDyK8D5O9Phpbd6SZWgI7PwzmmfN1upeOJlvybDSgCw==", + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.5.tgz", + "integrity": "sha512-6xpotnECFy/og7tKSBVmUNft7J3jyXAka4XvG6AUhFWRz+Q/Ljus7znJAA3bxColfQLdS+XsjoodtJfCgeTEFQ==", "dev": true }, "node_modules/object-inspect": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", - "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==", + "version": "1.12.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", + "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -4202,9 +4158,9 @@ } }, "node_modules/pirates": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.5.tgz", - "integrity": "sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==", + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", + "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", "dev": true, "engines": { "node": ">= 6" @@ -4306,9 +4262,9 @@ "dev": true }, "node_modules/punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", + "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", "dev": true, "engines": { "node": ">=6" @@ -4398,12 +4354,12 @@ "dev": true }, "node_modules/resolve": { - "version": "1.22.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", - "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", + "version": "1.22.2", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz", + "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==", "dev": true, "dependencies": { - "is-core-module": "^2.9.0", + "is-core-module": "^2.11.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, @@ -4436,9 +4392,9 @@ } }, "node_modules/resolve.exports": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-1.1.0.tgz", - "integrity": "sha512-J1l+Zxxp4XK3LUDZ9m60LRJF/mAe4z6a4xyabPHk7pvK5t35dACV32iIjJDFeWZFfZlO29w6SZ67knR0tHzJtQ==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-1.1.1.tgz", + "integrity": "sha512-/NtpHNDN7jWhAaQ9BvBUYZ6YTXsRBgfqWFWP7BZBaoMJO/I3G5OFzvTuWNlZC3aPjins1F+TNrLKsGbH4rfsRQ==", "dev": true, "engines": { "node": ">=10" @@ -4496,12 +4452,12 @@ } }, "node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true, "bin": { - "semver": "bin/semver" + "semver": "bin/semver.js" } }, "node_modules/send": { @@ -4527,6 +4483,11 @@ "node": ">= 0.8.0" } }, + "node_modules/send/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, "node_modules/serve-static": { "version": "1.15.0", "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", @@ -4648,9 +4609,9 @@ "dev": true }, "node_modules/stack-utils": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.5.tgz", - "integrity": "sha512-xrQcmYhOsn/1kX+Vraq+7j4oE2j/6BFscZ0etmYg81xuM8Gq0022Pxb8+IqgOFUIaxHs0KaSb7T1+OegiNrNFA==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", + "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", "dev": true, "dependencies": { "escape-string-regexp": "^2.0.0" @@ -4659,15 +4620,6 @@ "node": ">=10" } }, - "node_modules/stack-utils/node_modules/escape-string-regexp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", - "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/statuses": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", @@ -4746,22 +4698,21 @@ } }, "node_modules/superagent": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/superagent/-/superagent-8.0.2.tgz", - "integrity": "sha512-QtYZ9uaNAMexI7XWl2vAXAh0j4q9H7T0WVEI/y5qaUB3QLwxo+voUgCQ217AokJzUTIVOp0RTo7fhZrwhD7A2Q==", - "deprecated": "Please use v8.0.0 until https://github.com/visionmedia/superagent/issues/1743 is resolved", + "version": "8.0.9", + "resolved": "https://registry.npmjs.org/superagent/-/superagent-8.0.9.tgz", + "integrity": "sha512-4C7Bh5pyHTvU33KpZgwrNKh/VQnvgtCSqPRfJAUdmrtSYePVzVg4E4OzsrbkhJj9O7SO6Bnv75K/F8XVZT8YHA==", "dev": true, "dependencies": { "component-emitter": "^1.3.0", - "cookiejar": "^2.1.3", + "cookiejar": "^2.1.4", "debug": "^4.3.4", "fast-safe-stringify": "^2.1.1", "form-data": "^4.0.0", - "formidable": "^2.0.1", + "formidable": "^2.1.2", "methods": "^1.1.2", "mime": "2.6.0", "qs": "^6.11.0", - "semver": "^7.3.7" + "semver": "^7.3.8" }, "engines": { "node": ">=6.4.0 <13 || >=14" @@ -4784,6 +4735,32 @@ } } }, + "node_modules/superagent/node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dev": true, + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/superagent/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/superagent/node_modules/mime": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-2.6.0.tgz", @@ -4817,14 +4794,20 @@ "node": ">=10" } }, + "node_modules/superagent/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, "node_modules/supertest": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/supertest/-/supertest-6.3.0.tgz", - "integrity": "sha512-QgWju1cNoacP81Rv88NKkQ4oXTzGg0eNZtOoxp1ROpbS4OHY/eK5b8meShuFtdni161o5X0VQvgo7ErVyKK+Ow==", + "version": "6.3.3", + "resolved": "https://registry.npmjs.org/supertest/-/supertest-6.3.3.tgz", + "integrity": "sha512-EMCG6G8gDu5qEqRQ3JjjPs6+FYT1a7Hv5ApHvtSghmOFJYtsU5S+pSb6Y2EUeCEY3CmEL3mmQ8YWlPOzQomabA==", "dev": true, "dependencies": { "methods": "^1.1.2", - "superagent": "^8.0.0" + "superagent": "^8.0.5" }, "engines": { "node": ">=6.4.0" @@ -4903,9 +4886,9 @@ } }, "node_modules/throat": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/throat/-/throat-6.0.1.tgz", - "integrity": "sha512-8hmiGIJMDlwjg7dlJ4yKGLK8EsYqKgPWbG3b4wjJddKNwc7N7Dpn08Df4szr/sZdMVeOstrdYSsqzX6BYbcB+w==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/throat/-/throat-6.0.2.tgz", + "integrity": "sha512-WKexMoJj3vEuK0yFEapj8y64V0A6xcuPuK9Gt1d0R+dzCSJc0lHqQytAbSB4cDAK0dWh4T0E2ETkoLE2WZ41OQ==", "dev": true }, "node_modules/tmpl": { @@ -4956,9 +4939,9 @@ } }, "node_modules/tough-cookie": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.2.tgz", - "integrity": "sha512-G9fqXWoYFZgTc2z8Q5zaHy/vJMjm+WV0AkAeHxVCQiEB1b+dGvWzFW6QV07cY5jQ5gRkeid2qIkzkxUnmoQZUQ==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", + "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==", "dev": true, "dependencies": { "psl": "^1.1.33", @@ -5071,9 +5054,9 @@ } }, "node_modules/update-browserslist-db": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz", - "integrity": "sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ==", + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", + "integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==", "dev": true, "funding": [ { @@ -5083,6 +5066,10 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ], "dependencies": { @@ -5090,7 +5077,7 @@ "picocolors": "^1.0.0" }, "bin": { - "browserslist-lint": "cli.js" + "update-browserslist-db": "cli.js" }, "peerDependencies": { "browserslist": ">= 4.21.0" @@ -5316,9 +5303,9 @@ } }, "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", "dev": true }, "node_modules/yargs": { diff --git a/1-Authentication/1-sign-in/App/package.json b/1-Authentication/1-sign-in/App/package.json index 292e706..f19a52a 100644 --- a/1-Authentication/1-sign-in/App/package.json +++ b/1-Authentication/1-sign-in/App/package.json @@ -15,7 +15,7 @@ "ejs": "^3.1.8", "express": "^4.18.1", "express-session": "^1.17.3", - "msal-node-wrapper": "file:../../../common/msal-node-wrapper" + "msal-node-wrapper": "file:../../../Common/msal-node-wrapper" }, "devDependencies": { "jest": "^27.0.6", diff --git a/1-Authentication/2-sign-in-b2c/App/package-lock.json b/1-Authentication/2-sign-in-b2c/App/package-lock.json index fb48bd2..c5a99ce 100644 --- a/1-Authentication/2-sign-in-b2c/App/package-lock.json +++ b/1-Authentication/2-sign-in-b2c/App/package-lock.json @@ -13,7 +13,7 @@ "ejs": "^3.1.8", "express": "^4.18.1", "express-session": "^1.17.3", - "msal-node-wrapper": "file:../../../common/msal-node-wrapper" + "msal-node-wrapper": "file:../../../Common/msal-node-wrapper" }, "devDependencies": { "jest": "^27.0.6", diff --git a/1-Authentication/2-sign-in-b2c/App/package.json b/1-Authentication/2-sign-in-b2c/App/package.json index 2b3a526..3ec2e7c 100644 --- a/1-Authentication/2-sign-in-b2c/App/package.json +++ b/1-Authentication/2-sign-in-b2c/App/package.json @@ -15,7 +15,7 @@ "ejs": "^3.1.8", "express": "^4.18.1", "express-session": "^1.17.3", - "msal-node-wrapper": "file:../../../common/msal-node-wrapper" + "msal-node-wrapper": "file:../../../Common/msal-node-wrapper" }, "devDependencies": { "jest": "^27.0.6", diff --git a/2-Authorization/1-call-graph/App/package-lock.json b/2-Authorization/1-call-graph/App/package-lock.json index ecf33ea..72ef40f 100644 --- a/2-Authorization/1-call-graph/App/package-lock.json +++ b/2-Authorization/1-call-graph/App/package-lock.json @@ -15,7 +15,7 @@ "express": "^4.18.1", "express-session": "^1.17.3", "isomorphic-fetch": "^3.0.0", - "msal-node-wrapper": "file:../../../common/msal-node-wrapper" + "msal-node-wrapper": "file:../../../Common/msal-node-wrapper" }, "devDependencies": { "jest": "^27.0.6", diff --git a/2-Authorization/1-call-graph/App/package.json b/2-Authorization/1-call-graph/App/package.json index ddb78ad..28398ac 100644 --- a/2-Authorization/1-call-graph/App/package.json +++ b/2-Authorization/1-call-graph/App/package.json @@ -17,7 +17,7 @@ "express": "^4.18.1", "express-session": "^1.17.3", "isomorphic-fetch": "^3.0.0", - "msal-node-wrapper": "file:../../../common/msal-node-wrapper" + "msal-node-wrapper": "file:../../../Common/msal-node-wrapper" }, "devDependencies": { "jest": "^27.0.6", diff --git a/3-Deployment/App/package.json b/3-Deployment/App/package.json index d2ed3f3..ca59ebe 100644 --- a/3-Deployment/App/package.json +++ b/3-Deployment/App/package.json @@ -20,7 +20,7 @@ "express": "^4.18.1", "express-session": "^1.17.3", "isomorphic-fetch": "^3.0.0", - "msal-node-wrapper": "file:../../common/msal-node-wrapper" + "msal-node-wrapper": "file:../../Common/msal-node-wrapper" }, "devDependencies": { "jest": "^27.0.6", diff --git a/4-AccessControl/1-app-roles/App/package-lock.json b/4-AccessControl/1-app-roles/App/package-lock.json index 2d3254e..d2a60c0 100644 --- a/4-AccessControl/1-app-roles/App/package-lock.json +++ b/4-AccessControl/1-app-roles/App/package-lock.json @@ -15,7 +15,7 @@ "express-session": "^1.17.3", "lowdb": "^1.0.0", "method-override": "^3.0.0", - "msal-node-wrapper": "file:../../../common/msal-node-wrapper", + "msal-node-wrapper": "file:../../../Common/msal-node-wrapper", "nanoid": "^3.3.2" }, "devDependencies": { diff --git a/4-AccessControl/1-app-roles/App/package.json b/4-AccessControl/1-app-roles/App/package.json index 09d6bf1..c470cb0 100644 --- a/4-AccessControl/1-app-roles/App/package.json +++ b/4-AccessControl/1-app-roles/App/package.json @@ -17,7 +17,7 @@ "express-session": "^1.17.3", "lowdb": "^1.0.0", "method-override": "^3.0.0", - "msal-node-wrapper": "file:../../../common/msal-node-wrapper", + "msal-node-wrapper": "file:../../../Common/msal-node-wrapper", "nanoid": "^3.3.2" }, "devDependencies": { diff --git a/4-AccessControl/2-security-groups/App/package-lock.json b/4-AccessControl/2-security-groups/App/package-lock.json index f7707ce..8d2f942 100644 --- a/4-AccessControl/2-security-groups/App/package-lock.json +++ b/4-AccessControl/2-security-groups/App/package-lock.json @@ -15,7 +15,7 @@ "express-session": "^1.17.3", "lowdb": "^1.0.0", "method-override": "^3.0.0", - "msal-node-wrapper": "file:../../../common/msal-node-wrapper", + "msal-node-wrapper": "file:../../../Common/msal-node-wrapper", "nanoid": "^3.3.2" }, "devDependencies": { diff --git a/4-AccessControl/2-security-groups/App/package.json b/4-AccessControl/2-security-groups/App/package.json index bd3c2d4..cfb75e3 100644 --- a/4-AccessControl/2-security-groups/App/package.json +++ b/4-AccessControl/2-security-groups/App/package.json @@ -17,7 +17,7 @@ "express-session": "^1.17.3", "lowdb": "^1.0.0", "method-override": "^3.0.0", - "msal-node-wrapper": "file:../../../common/msal-node-wrapper", + "msal-node-wrapper": "file:../../../Common/msal-node-wrapper", "nanoid": "^3.3.2" }, "devDependencies": { From a7d1b35e91f2916293b5221a9756a102aa5e8e92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Do=C4=9Fan=20Eri=C5=9Fen?= Date: Mon, 26 Jun 2023 22:43:36 -0700 Subject: [PATCH 02/18] remove husky --- .husky/.gitignore | 1 - .husky/pre-commit | 5 ----- Common/msal-node-wrapper/package-lock.json | 13 ------------- Common/msal-node-wrapper/package.json | 6 ++---- 4 files changed, 2 insertions(+), 23 deletions(-) delete mode 100644 .husky/.gitignore delete mode 100644 .husky/pre-commit diff --git a/.husky/.gitignore b/.husky/.gitignore deleted file mode 100644 index 31354ec..0000000 --- a/.husky/.gitignore +++ /dev/null @@ -1 +0,0 @@ -_ diff --git a/.husky/pre-commit b/.husky/pre-commit deleted file mode 100644 index 0486738..0000000 --- a/.husky/pre-commit +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -. "$(dirname "$0")/_/husky.sh" - -cd common/msal-node-wrapper -npm run lint diff --git a/Common/msal-node-wrapper/package-lock.json b/Common/msal-node-wrapper/package-lock.json index dab9e6c..dbcac4d 100644 --- a/Common/msal-node-wrapper/package-lock.json +++ b/Common/msal-node-wrapper/package-lock.json @@ -28,7 +28,6 @@ "eslint-plugin-header": "^3.1.1", "eslint-plugin-import": "^2.27.5", "eslint-plugin-security": "^1.7.1", - "husky": "^6.0.0", "jest": "^29.5.0", "rollup": "^3.20.1", "sinon": "^15.0.4", @@ -3887,18 +3886,6 @@ "node": ">=10.17.0" } }, - "node_modules/husky": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/husky/-/husky-6.0.0.tgz", - "integrity": "sha512-SQS2gDTB7tBN486QSoKPKQItZw97BMOd+Kdb6ghfpBc0yXyzrddI0oDV5MkDAbuB4X2mO3/nj60TRMcYxwzZeQ==", - "dev": true, - "bin": { - "husky": "lib/bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/typicode" - } - }, "node_modules/iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", diff --git a/Common/msal-node-wrapper/package.json b/Common/msal-node-wrapper/package.json index 33911d6..d619ca9 100644 --- a/Common/msal-node-wrapper/package.json +++ b/Common/msal-node-wrapper/package.json @@ -21,11 +21,10 @@ "test:coverage": "jest --coverage", "lint": "eslint . --ext .ts", "lint:fix": "npm run lint -- --fix", - "docs": "typedoc", - "prepare": "cd ../.. && husky install" + "docs": "typedoc" }, "name": "msal-node-wrapper", - "author": "identity-developer-guidance", + "author": "Microsoft", "module": "dist/msal-node-wrapper.esm.js", "devDependencies": { "@rollup/plugin-node-resolve": "^15.0.1", @@ -41,7 +40,6 @@ "eslint-plugin-header": "^3.1.1", "eslint-plugin-import": "^2.27.5", "eslint-plugin-security": "^1.7.1", - "husky": "^6.0.0", "jest": "^29.5.0", "rollup": "^3.20.1", "sinon": "^15.0.4", From f112f6151d6c847cd3b5e522da3fc58e6f4b939a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Do=C4=9Fan=20Eri=C5=9Fen?= Date: Mon, 26 Jun 2023 22:53:20 -0700 Subject: [PATCH 03/18] update package json --- .github/workflows/build-samples.yml | 10 +- .../1-sign-in/App/package-lock.json | 116 +++++++++++++++++- 1-Authentication/1-sign-in/App/package.json | 1 + .../2-sign-in-b2c/App/package-lock.json | 99 ++++++++++++++- .../2-sign-in-b2c/App/package.json | 1 + .../1-call-graph/App/package-lock.json | 99 ++++++++++++++- 2-Authorization/1-call-graph/App/package.json | 1 + 3-Deployment/App/package-lock.json | 4 +- 3-Deployment/App/package.json | 1 + .../1-app-roles/App/package-lock.json | 96 ++++++++++++++- 4-AccessControl/1-app-roles/App/package.json | 1 + .../2-security-groups/App/package-lock.json | 96 ++++++++++++++- .../2-security-groups/App/package.json | 1 + Common/msal-node-wrapper/package.json | 2 +- 14 files changed, 497 insertions(+), 31 deletions(-) diff --git a/.github/workflows/build-samples.yml b/.github/workflows/build-samples.yml index 5d6f10c..721fa90 100644 --- a/.github/workflows/build-samples.yml +++ b/.github/workflows/build-samples.yml @@ -33,30 +33,30 @@ jobs: - run: | cd 1-Authentication/1-sign-in/App - npm ci + npm install npm audit --production npm run test - run: | cd 1-Authentication/2-sign-in-b2c/App - npm ci + npm install npm audit --production npm run test - run: | cd 2-Authorization/1-call-graph/App - npm ci + npm install npm audit --production npm run test - run: | cd 4-AccessControl/1-app-roles/App - npm ci + npm install npm audit --production npm run test - run: | cd 4-AccessControl/2-security-groups/App - npm ci + npm install npm audit --production npm run test \ No newline at end of file diff --git a/1-Authentication/1-sign-in/App/package-lock.json b/1-Authentication/1-sign-in/App/package-lock.json index 6b3cfd9..e6cf75f 100644 --- a/1-Authentication/1-sign-in/App/package-lock.json +++ b/1-Authentication/1-sign-in/App/package-lock.json @@ -9,6 +9,7 @@ "version": "1.0.0", "license": "MIT", "dependencies": { + "@azure/msal-node": "^1.17.3", "bootstrap": "^4.6.0", "ejs": "^3.1.8", "express": "^4.18.1", @@ -44,7 +45,6 @@ "eslint-plugin-header": "^3.1.1", "eslint-plugin-import": "^2.27.5", "eslint-plugin-security": "^1.7.1", - "husky": "^6.0.0", "jest": "^29.5.0", "rollup": "^3.20.1", "sinon": "^15.0.4", @@ -74,6 +74,27 @@ "node": ">=6.0.0" } }, + "node_modules/@azure/msal-common": { + "version": "13.1.0", + "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-13.1.0.tgz", + "integrity": "sha512-wj+ULrRB0HTuMmtrMjg8j3guCx32GE2BCPbsMCZkHgL1BZetC3o/Su5UJEQMX1HNc9CrIaQNx5WaKWHygYDe0g==", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/@azure/msal-node": { + "version": "1.17.3", + "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-1.17.3.tgz", + "integrity": "sha512-slsa+388bQQWnWH1V91KL+zV57rIp/0OQFfF0EmVMY8gnEIkAnpWWFUVBTTMbxEyjEFMk5ZW9xiHvHBcYFHzDw==", + "dependencies": { + "@azure/msal-common": "13.1.0", + "jsonwebtoken": "^9.0.0", + "uuid": "^8.3.0" + }, + "engines": { + "node": "10 || 12 || 14 || 16 || 18" + } + }, "node_modules/@babel/code-frame": { "version": "7.22.5", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.5.tgz", @@ -1511,6 +1532,11 @@ "node-int64": "^0.4.0" } }, + "node_modules/buffer-equal-constant-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==" + }, "node_modules/buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", @@ -1919,6 +1945,14 @@ "node": ">=8" } }, + "node_modules/ecdsa-sig-formatter": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", + "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, "node_modules/ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", @@ -3637,6 +3671,75 @@ "node": ">=6" } }, + "node_modules/jsonwebtoken": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.0.tgz", + "integrity": "sha512-tuGfYXxkQGDPnLJ7SibiQgVgeDgfbPq2k2ICcbgqW8WxWLBAxKQM/ZCu/IT8SOSwmaYl4dpTFCW5xZv7YbbWUw==", + "dependencies": { + "jws": "^3.2.2", + "lodash": "^4.17.21", + "ms": "^2.1.1", + "semver": "^7.3.8" + }, + "engines": { + "node": ">=12", + "npm": ">=6" + } + }, + "node_modules/jsonwebtoken/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/jsonwebtoken/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "node_modules/jsonwebtoken/node_modules/semver": { + "version": "7.5.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz", + "integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/jsonwebtoken/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + }, + "node_modules/jwa": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", + "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", + "dependencies": { + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/jws": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", + "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", + "dependencies": { + "jwa": "^1.4.1", + "safe-buffer": "^5.0.1" + } + }, "node_modules/kleur": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", @@ -3689,8 +3792,7 @@ "node_modules/lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, "node_modules/lru-cache": { "version": "5.1.1", @@ -5101,6 +5203,14 @@ "node": ">= 0.4.0" } }, + "node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/v8-to-istanbul": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-8.1.1.tgz", diff --git a/1-Authentication/1-sign-in/App/package.json b/1-Authentication/1-sign-in/App/package.json index f19a52a..b7dfef8 100644 --- a/1-Authentication/1-sign-in/App/package.json +++ b/1-Authentication/1-sign-in/App/package.json @@ -11,6 +11,7 @@ "author": "derisen", "license": "MIT", "dependencies": { + "@azure/msal-node": "^1.17.3", "bootstrap": "^4.6.0", "ejs": "^3.1.8", "express": "^4.18.1", diff --git a/1-Authentication/2-sign-in-b2c/App/package-lock.json b/1-Authentication/2-sign-in-b2c/App/package-lock.json index c5a99ce..cf18128 100644 --- a/1-Authentication/2-sign-in-b2c/App/package-lock.json +++ b/1-Authentication/2-sign-in-b2c/App/package-lock.json @@ -9,6 +9,7 @@ "version": "1.0.0", "license": "MIT", "dependencies": { + "@azure/msal-node": "^1.17.3", "bootstrap": "^4.6.0", "ejs": "^3.1.8", "express": "^4.18.1", @@ -44,7 +45,6 @@ "eslint-plugin-header": "^3.1.1", "eslint-plugin-import": "^2.27.5", "eslint-plugin-security": "^1.7.1", - "husky": "^6.0.0", "jest": "^29.5.0", "rollup": "^3.20.1", "sinon": "^15.0.4", @@ -71,6 +71,27 @@ "node": ">=6.0.0" } }, + "node_modules/@azure/msal-common": { + "version": "13.1.0", + "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-13.1.0.tgz", + "integrity": "sha512-wj+ULrRB0HTuMmtrMjg8j3guCx32GE2BCPbsMCZkHgL1BZetC3o/Su5UJEQMX1HNc9CrIaQNx5WaKWHygYDe0g==", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/@azure/msal-node": { + "version": "1.17.3", + "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-1.17.3.tgz", + "integrity": "sha512-slsa+388bQQWnWH1V91KL+zV57rIp/0OQFfF0EmVMY8gnEIkAnpWWFUVBTTMbxEyjEFMk5ZW9xiHvHBcYFHzDw==", + "dependencies": { + "@azure/msal-common": "13.1.0", + "jsonwebtoken": "^9.0.0", + "uuid": "^8.3.0" + }, + "engines": { + "node": "10 || 12 || 14 || 16 || 18" + } + }, "node_modules/@babel/code-frame": { "version": "7.22.5", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.5.tgz", @@ -1525,6 +1546,11 @@ "node-int64": "^0.4.0" } }, + "node_modules/buffer-equal-constant-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==" + }, "node_modules/buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", @@ -1925,6 +1951,14 @@ "node": ">=8" } }, + "node_modules/ecdsa-sig-formatter": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", + "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, "node_modules/ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", @@ -3637,6 +3671,54 @@ "node": ">=6" } }, + "node_modules/jsonwebtoken": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.0.tgz", + "integrity": "sha512-tuGfYXxkQGDPnLJ7SibiQgVgeDgfbPq2k2ICcbgqW8WxWLBAxKQM/ZCu/IT8SOSwmaYl4dpTFCW5xZv7YbbWUw==", + "dependencies": { + "jws": "^3.2.2", + "lodash": "^4.17.21", + "ms": "^2.1.1", + "semver": "^7.3.8" + }, + "engines": { + "node": ">=12", + "npm": ">=6" + } + }, + "node_modules/jsonwebtoken/node_modules/semver": { + "version": "7.5.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz", + "integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/jwa": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", + "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", + "dependencies": { + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/jws": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", + "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", + "dependencies": { + "jwa": "^1.4.1", + "safe-buffer": "^5.0.1" + } + }, "node_modules/kleur": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", @@ -3689,14 +3771,12 @@ "node_modules/lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, "node_modules/lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, "dependencies": { "yallist": "^4.0.0" }, @@ -5076,6 +5156,14 @@ "node": ">= 0.4.0" } }, + "node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/v8-to-istanbul": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-8.1.1.tgz", @@ -5280,8 +5368,7 @@ "node_modules/yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, "node_modules/yargs": { "version": "16.2.0", diff --git a/1-Authentication/2-sign-in-b2c/App/package.json b/1-Authentication/2-sign-in-b2c/App/package.json index 3ec2e7c..608a0c6 100644 --- a/1-Authentication/2-sign-in-b2c/App/package.json +++ b/1-Authentication/2-sign-in-b2c/App/package.json @@ -11,6 +11,7 @@ "author": "derisen", "license": "MIT", "dependencies": { + "@azure/msal-node": "^1.17.3", "bootstrap": "^4.6.0", "ejs": "^3.1.8", "express": "^4.18.1", diff --git a/2-Authorization/1-call-graph/App/package-lock.json b/2-Authorization/1-call-graph/App/package-lock.json index 72ef40f..e49434e 100644 --- a/2-Authorization/1-call-graph/App/package-lock.json +++ b/2-Authorization/1-call-graph/App/package-lock.json @@ -9,6 +9,7 @@ "version": "1.0.0", "license": "MIT", "dependencies": { + "@azure/msal-node": "^1.17.3", "@microsoft/microsoft-graph-client": "^3.0.2", "bootstrap": "^4.6.0", "ejs": "^3.1.8", @@ -46,7 +47,6 @@ "eslint-plugin-header": "^3.1.1", "eslint-plugin-import": "^2.27.5", "eslint-plugin-security": "^1.7.1", - "husky": "^6.0.0", "jest": "^29.5.0", "rollup": "^3.20.1", "sinon": "^15.0.4", @@ -73,6 +73,27 @@ "node": ">=6.0.0" } }, + "node_modules/@azure/msal-common": { + "version": "13.1.0", + "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-13.1.0.tgz", + "integrity": "sha512-wj+ULrRB0HTuMmtrMjg8j3guCx32GE2BCPbsMCZkHgL1BZetC3o/Su5UJEQMX1HNc9CrIaQNx5WaKWHygYDe0g==", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/@azure/msal-node": { + "version": "1.17.3", + "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-1.17.3.tgz", + "integrity": "sha512-slsa+388bQQWnWH1V91KL+zV57rIp/0OQFfF0EmVMY8gnEIkAnpWWFUVBTTMbxEyjEFMk5ZW9xiHvHBcYFHzDw==", + "dependencies": { + "@azure/msal-common": "13.1.0", + "jsonwebtoken": "^9.0.0", + "uuid": "^8.3.0" + }, + "engines": { + "node": "10 || 12 || 14 || 16 || 18" + } + }, "node_modules/@babel/code-frame": { "version": "7.22.5", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.5.tgz", @@ -1564,6 +1585,11 @@ "node-int64": "^0.4.0" } }, + "node_modules/buffer-equal-constant-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==" + }, "node_modules/buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", @@ -1999,6 +2025,14 @@ "node": ">=8" } }, + "node_modules/ecdsa-sig-formatter": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", + "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, "node_modules/ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", @@ -3755,6 +3789,54 @@ "node": ">=6" } }, + "node_modules/jsonwebtoken": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.0.tgz", + "integrity": "sha512-tuGfYXxkQGDPnLJ7SibiQgVgeDgfbPq2k2ICcbgqW8WxWLBAxKQM/ZCu/IT8SOSwmaYl4dpTFCW5xZv7YbbWUw==", + "dependencies": { + "jws": "^3.2.2", + "lodash": "^4.17.21", + "ms": "^2.1.1", + "semver": "^7.3.8" + }, + "engines": { + "node": ">=12", + "npm": ">=6" + } + }, + "node_modules/jsonwebtoken/node_modules/semver": { + "version": "7.5.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz", + "integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/jwa": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", + "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", + "dependencies": { + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/jws": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", + "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", + "dependencies": { + "jwa": "^1.4.1", + "safe-buffer": "^5.0.1" + } + }, "node_modules/kleur": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", @@ -3807,14 +3889,12 @@ "node_modules/lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, "node_modules/lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, "dependencies": { "yallist": "^4.0.0" }, @@ -5216,6 +5296,14 @@ "node": ">= 0.4.0" } }, + "node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/v8-to-istanbul": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-8.1.1.tgz", @@ -5416,8 +5504,7 @@ "node_modules/yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, "node_modules/yargs": { "version": "16.2.0", diff --git a/2-Authorization/1-call-graph/App/package.json b/2-Authorization/1-call-graph/App/package.json index 28398ac..d18345b 100644 --- a/2-Authorization/1-call-graph/App/package.json +++ b/2-Authorization/1-call-graph/App/package.json @@ -11,6 +11,7 @@ "author": "derisen", "license": "MIT", "dependencies": { + "@azure/msal-node": "^1.17.3", "@microsoft/microsoft-graph-client": "^3.0.2", "bootstrap": "^4.6.0", "ejs": "^3.1.8", diff --git a/3-Deployment/App/package-lock.json b/3-Deployment/App/package-lock.json index 8884806..3ed4b16 100644 --- a/3-Deployment/App/package-lock.json +++ b/3-Deployment/App/package-lock.json @@ -11,6 +11,7 @@ "dependencies": { "@azure/identity": "^3.2.3", "@azure/keyvault-secrets": "^4.7.0", + "@azure/msal-node": "^1.17.3", "@microsoft/microsoft-graph-client": "^3.0.2", "bootstrap": "^4.6.0", "dotenv": "^8.2.0", @@ -18,7 +19,7 @@ "express": "^4.18.1", "express-session": "^1.17.3", "isomorphic-fetch": "^3.0.0", - "msal-node-wrapper": "file:../../common/msal-node-wrapper" + "msal-node-wrapper": "file:../../Common/msal-node-wrapper" }, "devDependencies": { "jest": "^27.0.6", @@ -49,7 +50,6 @@ "eslint-plugin-header": "^3.1.1", "eslint-plugin-import": "^2.27.5", "eslint-plugin-security": "^1.7.1", - "husky": "^6.0.0", "jest": "^29.5.0", "rollup": "^3.20.1", "sinon": "^15.0.4", diff --git a/3-Deployment/App/package.json b/3-Deployment/App/package.json index ca59ebe..438c9dd 100644 --- a/3-Deployment/App/package.json +++ b/3-Deployment/App/package.json @@ -13,6 +13,7 @@ "dependencies": { "@azure/identity": "^3.2.3", "@azure/keyvault-secrets": "^4.7.0", + "@azure/msal-node": "^1.17.3", "@microsoft/microsoft-graph-client": "^3.0.2", "bootstrap": "^4.6.0", "dotenv": "^8.2.0", diff --git a/4-AccessControl/1-app-roles/App/package-lock.json b/4-AccessControl/1-app-roles/App/package-lock.json index d2a60c0..b915e30 100644 --- a/4-AccessControl/1-app-roles/App/package-lock.json +++ b/4-AccessControl/1-app-roles/App/package-lock.json @@ -9,6 +9,7 @@ "version": "1.0.0", "license": "MIT", "dependencies": { + "@azure/msal-node": "^1.17.3", "bootstrap": "^4.6.0", "ejs": "^3.1.8", "express": "^4.18.1", @@ -47,7 +48,6 @@ "eslint-plugin-header": "^3.1.1", "eslint-plugin-import": "^2.27.5", "eslint-plugin-security": "^1.7.1", - "husky": "^6.0.0", "jest": "^29.5.0", "rollup": "^3.20.1", "sinon": "^15.0.4", @@ -112,6 +112,27 @@ "node": ">=6.0.0" } }, + "node_modules/@azure/msal-common": { + "version": "13.1.0", + "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-13.1.0.tgz", + "integrity": "sha512-wj+ULrRB0HTuMmtrMjg8j3guCx32GE2BCPbsMCZkHgL1BZetC3o/Su5UJEQMX1HNc9CrIaQNx5WaKWHygYDe0g==", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/@azure/msal-node": { + "version": "1.17.3", + "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-1.17.3.tgz", + "integrity": "sha512-slsa+388bQQWnWH1V91KL+zV57rIp/0OQFfF0EmVMY8gnEIkAnpWWFUVBTTMbxEyjEFMk5ZW9xiHvHBcYFHzDw==", + "dependencies": { + "@azure/msal-common": "13.1.0", + "jsonwebtoken": "^9.0.0", + "uuid": "^8.3.0" + }, + "engines": { + "node": "10 || 12 || 14 || 16 || 18" + } + }, "node_modules/@babel/code-frame": { "version": "7.22.5", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.5.tgz", @@ -1566,6 +1587,11 @@ "node-int64": "^0.4.0" } }, + "node_modules/buffer-equal-constant-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==" + }, "node_modules/buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", @@ -1966,6 +1992,14 @@ "node": ">=8" } }, + "node_modules/ecdsa-sig-formatter": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", + "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, "node_modules/ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", @@ -3682,6 +3716,54 @@ "node": ">=6" } }, + "node_modules/jsonwebtoken": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.0.tgz", + "integrity": "sha512-tuGfYXxkQGDPnLJ7SibiQgVgeDgfbPq2k2ICcbgqW8WxWLBAxKQM/ZCu/IT8SOSwmaYl4dpTFCW5xZv7YbbWUw==", + "dependencies": { + "jws": "^3.2.2", + "lodash": "^4.17.21", + "ms": "^2.1.1", + "semver": "^7.3.8" + }, + "engines": { + "node": ">=12", + "npm": ">=6" + } + }, + "node_modules/jsonwebtoken/node_modules/semver": { + "version": "7.5.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz", + "integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/jwa": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", + "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", + "dependencies": { + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/jws": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", + "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", + "dependencies": { + "jwa": "^1.4.1", + "safe-buffer": "^5.0.1" + } + }, "node_modules/kleur": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", @@ -3755,7 +3837,6 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, "dependencies": { "yallist": "^4.0.0" }, @@ -5189,6 +5270,14 @@ "node": ">= 0.4.0" } }, + "node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/v8-to-istanbul": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-8.1.1.tgz", @@ -5393,8 +5482,7 @@ "node_modules/yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, "node_modules/yargs": { "version": "16.2.0", diff --git a/4-AccessControl/1-app-roles/App/package.json b/4-AccessControl/1-app-roles/App/package.json index c470cb0..f276f8c 100644 --- a/4-AccessControl/1-app-roles/App/package.json +++ b/4-AccessControl/1-app-roles/App/package.json @@ -11,6 +11,7 @@ "author": "derisen", "license": "MIT", "dependencies": { + "@azure/msal-node": "^1.17.3", "bootstrap": "^4.6.0", "ejs": "^3.1.8", "express": "^4.18.1", diff --git a/4-AccessControl/2-security-groups/App/package-lock.json b/4-AccessControl/2-security-groups/App/package-lock.json index 8d2f942..cd9cf40 100644 --- a/4-AccessControl/2-security-groups/App/package-lock.json +++ b/4-AccessControl/2-security-groups/App/package-lock.json @@ -9,6 +9,7 @@ "version": "1.0.0", "license": "MIT", "dependencies": { + "@azure/msal-node": "^1.17.3", "bootstrap": "^4.6.0", "ejs": "^3.1.8", "express": "^4.18.1", @@ -47,7 +48,6 @@ "eslint-plugin-header": "^3.1.1", "eslint-plugin-import": "^2.27.5", "eslint-plugin-security": "^1.7.1", - "husky": "^6.0.0", "jest": "^29.5.0", "rollup": "^3.20.1", "sinon": "^15.0.4", @@ -112,6 +112,27 @@ "node": ">=6.0.0" } }, + "node_modules/@azure/msal-common": { + "version": "13.1.0", + "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-13.1.0.tgz", + "integrity": "sha512-wj+ULrRB0HTuMmtrMjg8j3guCx32GE2BCPbsMCZkHgL1BZetC3o/Su5UJEQMX1HNc9CrIaQNx5WaKWHygYDe0g==", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/@azure/msal-node": { + "version": "1.17.3", + "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-1.17.3.tgz", + "integrity": "sha512-slsa+388bQQWnWH1V91KL+zV57rIp/0OQFfF0EmVMY8gnEIkAnpWWFUVBTTMbxEyjEFMk5ZW9xiHvHBcYFHzDw==", + "dependencies": { + "@azure/msal-common": "13.1.0", + "jsonwebtoken": "^9.0.0", + "uuid": "^8.3.0" + }, + "engines": { + "node": "10 || 12 || 14 || 16 || 18" + } + }, "node_modules/@babel/code-frame": { "version": "7.22.5", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.5.tgz", @@ -1566,6 +1587,11 @@ "node-int64": "^0.4.0" } }, + "node_modules/buffer-equal-constant-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==" + }, "node_modules/buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", @@ -1966,6 +1992,14 @@ "node": ">=8" } }, + "node_modules/ecdsa-sig-formatter": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", + "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, "node_modules/ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", @@ -3682,6 +3716,54 @@ "node": ">=6" } }, + "node_modules/jsonwebtoken": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.0.tgz", + "integrity": "sha512-tuGfYXxkQGDPnLJ7SibiQgVgeDgfbPq2k2ICcbgqW8WxWLBAxKQM/ZCu/IT8SOSwmaYl4dpTFCW5xZv7YbbWUw==", + "dependencies": { + "jws": "^3.2.2", + "lodash": "^4.17.21", + "ms": "^2.1.1", + "semver": "^7.3.8" + }, + "engines": { + "node": ">=12", + "npm": ">=6" + } + }, + "node_modules/jsonwebtoken/node_modules/semver": { + "version": "7.5.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz", + "integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/jwa": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", + "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", + "dependencies": { + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/jws": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", + "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", + "dependencies": { + "jwa": "^1.4.1", + "safe-buffer": "^5.0.1" + } + }, "node_modules/kleur": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", @@ -3755,7 +3837,6 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, "dependencies": { "yallist": "^4.0.0" }, @@ -5189,6 +5270,14 @@ "node": ">= 0.4.0" } }, + "node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/v8-to-istanbul": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-8.1.1.tgz", @@ -5393,8 +5482,7 @@ "node_modules/yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, "node_modules/yargs": { "version": "16.2.0", diff --git a/4-AccessControl/2-security-groups/App/package.json b/4-AccessControl/2-security-groups/App/package.json index cfb75e3..19bda78 100644 --- a/4-AccessControl/2-security-groups/App/package.json +++ b/4-AccessControl/2-security-groups/App/package.json @@ -11,6 +11,7 @@ "author": "derisen", "license": "MIT", "dependencies": { + "@azure/msal-node": "^1.17.3", "bootstrap": "^4.6.0", "ejs": "^3.1.8", "express": "^4.18.1", diff --git a/Common/msal-node-wrapper/package.json b/Common/msal-node-wrapper/package.json index d619ca9..b895766 100644 --- a/Common/msal-node-wrapper/package.json +++ b/Common/msal-node-wrapper/package.json @@ -11,7 +11,7 @@ }, "repository": { "type": "git", - "url": "git://github.com/Azure-Samples/msal-node-wrapper.git" + "url": "git://github.com/Azure-Samples/ms-identity-javascript-nodejs-tutorial.git" }, "scripts": { "build": "rollup -c --strictDeprecations --bundleConfigAsCjs", From 85656c8c2f245cbe773896bec536bf02626da638 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Do=C4=9Fan=20Eri=C5=9Fen?= Date: Mon, 26 Jun 2023 22:56:10 -0700 Subject: [PATCH 04/18] update workflow --- .github/workflows/build-samples.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/build-samples.yml b/.github/workflows/build-samples.yml index 721fa90..094a5cd 100644 --- a/.github/workflows/build-samples.yml +++ b/.github/workflows/build-samples.yml @@ -31,6 +31,12 @@ jobs: with: node-version: ${{ matrix.node-version }} + - run: | + cd Common/msal-node-wrapper + npm ci + npm audit --production + npm build --if-present + - run: | cd 1-Authentication/1-sign-in/App npm install From 0fb85d62ed2d6ca450f656384f11ce76d6196aeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Do=C4=9Fan=20Eri=C5=9Fen?= Date: Mon, 26 Jun 2023 22:57:07 -0700 Subject: [PATCH 05/18] update workflow --- .github/workflows/build-samples.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-samples.yml b/.github/workflows/build-samples.yml index 094a5cd..757431f 100644 --- a/.github/workflows/build-samples.yml +++ b/.github/workflows/build-samples.yml @@ -35,7 +35,7 @@ jobs: cd Common/msal-node-wrapper npm ci npm audit --production - npm build --if-present + npm run build --if-present - run: | cd 1-Authentication/1-sign-in/App From 5ecdc7eaad2c8c073d124b1c7cdf074fcb3c0621 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Do=C4=9Fan=20Eri=C5=9Fen?= Date: Mon, 26 Jun 2023 23:27:25 -0700 Subject: [PATCH 06/18] remove dist folder --- Common/msal-node-wrapper/.gitignore | 3 + .../dist/config/ConfigurationHelper.d.ts | 55 --------- .../dist/config/ConfigurationHelper.d.ts.map | 1 - .../dist/config/ConfigurationHelper.esm.js | 104 ---------------- .../config/ConfigurationHelper.esm.js.map | 1 - .../dist/config/ConfigurationHelper.js | 106 ---------------- .../dist/config/ConfigurationHelper.js.map | 1 - .../dist/config/ConfigurationTypes.d.ts | 23 ---- .../dist/config/ConfigurationTypes.d.ts.map | 1 - .../dist/config/ConfigurationTypes.esm.js | 13 -- .../dist/config/ConfigurationTypes.esm.js.map | 1 - .../dist/config/ConfigurationTypes.js | 13 -- .../dist/config/ConfigurationTypes.js.map | 1 - .../dist/error/AccessDeniedError.d.ts | 35 ------ .../dist/error/AccessDeniedError.d.ts.map | 1 - .../dist/error/AccessDeniedError.esm.js | 52 -------- .../dist/error/AccessDeniedError.esm.js.map | 1 - .../dist/error/AccessDeniedError.js | 55 --------- .../dist/error/AccessDeniedError.js.map | 1 - .../dist/error/GroupsOverageError.d.ts | 9 -- .../dist/error/GroupsOverageError.d.ts.map | 1 - .../dist/error/InteractionRequiredError.d.ts | 10 -- .../error/InteractionRequiredError.d.ts.map | 1 - .../error/InteractionRequiredError.esm.js | 33 ----- .../error/InteractionRequiredError.esm.js.map | 1 - .../dist/error/InteractionRequiredError.js | 35 ------ .../error/InteractionRequiredError.js.map | 1 - Common/msal-node-wrapper/dist/index.d.ts.map | 1 - Common/msal-node-wrapper/dist/index.esm.js | 6 - .../msal-node-wrapper/dist/index.esm.js.map | 1 - Common/msal-node-wrapper/dist/index.js | 25 ---- Common/msal-node-wrapper/dist/index.js.map | 1 - .../dist/middleware/MiddlewareOptions.d.ts | 43 ------- .../middleware/MiddlewareOptions.d.ts.map | 1 - .../middleware/authenticateMiddleware.d.ts | 6 - .../authenticateMiddleware.d.ts.map | 1 - .../middleware/authenticateMiddleware.esm.js | 73 ----------- .../authenticateMiddleware.esm.js.map | 1 - .../dist/middleware/authenticateMiddleware.js | 75 ------------ .../middleware/authenticateMiddleware.js.map | 1 - .../dist/middleware/context/AuthContext.d.ts | 50 -------- .../middleware/context/AuthContext.d.ts.map | 1 - .../middleware/context/AuthContext.esm.js | 85 ------------- .../middleware/context/AuthContext.esm.js.map | 1 - .../dist/middleware/context/AuthContext.js | 87 -------------- .../middleware/context/AuthContext.js.map | 1 - .../dist/middleware/errorMiddleware.d.ts | 5 - .../dist/middleware/errorMiddleware.d.ts.map | 1 - .../dist/middleware/errorMiddleware.esm.js | 22 ---- .../middleware/errorMiddleware.esm.js.map | 1 - .../dist/middleware/errorMiddleware.js | 24 ---- .../dist/middleware/errorMiddleware.js.map | 1 - .../dist/middleware/guardMiddleware.d.ts | 6 - .../dist/middleware/guardMiddleware.d.ts.map | 1 - .../dist/middleware/guardMiddleware.esm.js | 48 -------- .../middleware/guardMiddleware.esm.js.map | 1 - .../dist/middleware/guardMiddleware.js | 50 -------- .../dist/middleware/guardMiddleware.js.map | 1 - .../handlers/acquireTokenHandler.d.ts | 6 - .../handlers/acquireTokenHandler.d.ts.map | 1 - .../handlers/acquireTokenHandler.esm.js | 56 --------- .../handlers/acquireTokenHandler.esm.js.map | 1 - .../handlers/acquireTokenHandler.js | 58 --------- .../handlers/acquireTokenHandler.js.map | 1 - .../middleware/handlers/loginHandler.d.ts | 6 - .../middleware/handlers/loginHandler.d.ts.map | 1 - .../middleware/handlers/loginHandler.esm.js | 52 -------- .../handlers/loginHandler.esm.js.map | 1 - .../dist/middleware/handlers/loginHandler.js | 54 --------- .../middleware/handlers/loginHandler.js.map | 1 - .../middleware/handlers/logoutHandler.d.ts | 6 - .../handlers/logoutHandler.d.ts.map | 1 - .../middleware/handlers/logoutHandler.esm.js | 45 ------- .../handlers/logoutHandler.esm.js.map | 1 - .../dist/middleware/handlers/logoutHandler.js | 47 -------- .../middleware/handlers/logoutHandler.js.map | 1 - .../middleware/handlers/redirectHandler.d.ts | 5 - .../handlers/redirectHandler.d.ts.map | 1 - .../handlers/redirectHandler.esm.js | 43 ------- .../handlers/redirectHandler.esm.js.map | 1 - .../middleware/handlers/redirectHandler.js | 45 ------- .../handlers/redirectHandler.js.map | 1 - .../dist/network/FetchManager.d.ts | 28 ----- .../dist/network/FetchManager.d.ts.map | 1 - .../dist/network/FetchManager.esm.js | 105 ---------------- .../dist/network/FetchManager.esm.js.map | 1 - .../dist/network/FetchManager.js | 107 ----------------- .../dist/network/FetchManager.js.map | 1 - .../dist/packageMetadata.d.ts | 3 - .../dist/packageMetadata.d.ts.map | 1 - .../dist/packageMetadata.esm.js | 11 -- .../dist/packageMetadata.esm.js.map | 1 - .../msal-node-wrapper/dist/packageMetadata.js | 14 --- .../dist/packageMetadata.js.map | 1 - .../dist/provider/BaseAuthProvider.d.ts | 16 --- .../dist/provider/BaseAuthProvider.d.ts.map | 1 - .../dist/provider/BaseAuthProvider.esm.js | 37 ------ .../dist/provider/BaseAuthProvider.esm.js.map | 1 - .../dist/provider/BaseAuthProvider.js | 39 ------ .../dist/provider/BaseAuthProvider.js.map | 1 - .../dist/provider/WebAppAuthProvider.d.ts | 32 ----- .../dist/provider/WebAppAuthProvider.d.ts.map | 1 - .../dist/provider/WebAppAuthProvider.esm.js | 73 ----------- .../provider/WebAppAuthProvider.esm.js.map | 1 - .../dist/provider/WebAppAuthProvider.js | 75 ------------ .../dist/provider/WebAppAuthProvider.js.map | 1 - .../dist/utils/Constants.d.ts | 113 ------------------ .../dist/utils/Constants.d.ts.map | 1 - .../dist/utils/Constants.esm.js | 97 --------------- .../dist/utils/Constants.esm.js.map | 1 - .../msal-node-wrapper/dist/utils/Constants.js | 104 ---------------- .../dist/utils/Constants.js.map | 1 - .../dist/utils/UrlUtils.d.ts | 44 ------- .../dist/utils/UrlUtils.d.ts.map | 1 - .../dist/utils/UrlUtils.esm.js | 83 ------------- .../dist/utils/UrlUtils.esm.js.map | 1 - .../msal-node-wrapper/dist/utils/UrlUtils.js | 85 ------------- .../dist/utils/UrlUtils.js.map | 1 - 118 files changed, 3 insertions(+), 2696 deletions(-) delete mode 100644 Common/msal-node-wrapper/dist/config/ConfigurationHelper.d.ts delete mode 100644 Common/msal-node-wrapper/dist/config/ConfigurationHelper.d.ts.map delete mode 100644 Common/msal-node-wrapper/dist/config/ConfigurationHelper.esm.js delete mode 100644 Common/msal-node-wrapper/dist/config/ConfigurationHelper.esm.js.map delete mode 100644 Common/msal-node-wrapper/dist/config/ConfigurationHelper.js delete mode 100644 Common/msal-node-wrapper/dist/config/ConfigurationHelper.js.map delete mode 100644 Common/msal-node-wrapper/dist/config/ConfigurationTypes.d.ts delete mode 100644 Common/msal-node-wrapper/dist/config/ConfigurationTypes.d.ts.map delete mode 100644 Common/msal-node-wrapper/dist/config/ConfigurationTypes.esm.js delete mode 100644 Common/msal-node-wrapper/dist/config/ConfigurationTypes.esm.js.map delete mode 100644 Common/msal-node-wrapper/dist/config/ConfigurationTypes.js delete mode 100644 Common/msal-node-wrapper/dist/config/ConfigurationTypes.js.map delete mode 100644 Common/msal-node-wrapper/dist/error/AccessDeniedError.d.ts delete mode 100644 Common/msal-node-wrapper/dist/error/AccessDeniedError.d.ts.map delete mode 100644 Common/msal-node-wrapper/dist/error/AccessDeniedError.esm.js delete mode 100644 Common/msal-node-wrapper/dist/error/AccessDeniedError.esm.js.map delete mode 100644 Common/msal-node-wrapper/dist/error/AccessDeniedError.js delete mode 100644 Common/msal-node-wrapper/dist/error/AccessDeniedError.js.map delete mode 100644 Common/msal-node-wrapper/dist/error/GroupsOverageError.d.ts delete mode 100644 Common/msal-node-wrapper/dist/error/GroupsOverageError.d.ts.map delete mode 100644 Common/msal-node-wrapper/dist/error/InteractionRequiredError.d.ts delete mode 100644 Common/msal-node-wrapper/dist/error/InteractionRequiredError.d.ts.map delete mode 100644 Common/msal-node-wrapper/dist/error/InteractionRequiredError.esm.js delete mode 100644 Common/msal-node-wrapper/dist/error/InteractionRequiredError.esm.js.map delete mode 100644 Common/msal-node-wrapper/dist/error/InteractionRequiredError.js delete mode 100644 Common/msal-node-wrapper/dist/error/InteractionRequiredError.js.map delete mode 100644 Common/msal-node-wrapper/dist/index.d.ts.map delete mode 100644 Common/msal-node-wrapper/dist/index.esm.js delete mode 100644 Common/msal-node-wrapper/dist/index.esm.js.map delete mode 100644 Common/msal-node-wrapper/dist/index.js delete mode 100644 Common/msal-node-wrapper/dist/index.js.map delete mode 100644 Common/msal-node-wrapper/dist/middleware/MiddlewareOptions.d.ts delete mode 100644 Common/msal-node-wrapper/dist/middleware/MiddlewareOptions.d.ts.map delete mode 100644 Common/msal-node-wrapper/dist/middleware/authenticateMiddleware.d.ts delete mode 100644 Common/msal-node-wrapper/dist/middleware/authenticateMiddleware.d.ts.map delete mode 100644 Common/msal-node-wrapper/dist/middleware/authenticateMiddleware.esm.js delete mode 100644 Common/msal-node-wrapper/dist/middleware/authenticateMiddleware.esm.js.map delete mode 100644 Common/msal-node-wrapper/dist/middleware/authenticateMiddleware.js delete mode 100644 Common/msal-node-wrapper/dist/middleware/authenticateMiddleware.js.map delete mode 100644 Common/msal-node-wrapper/dist/middleware/context/AuthContext.d.ts delete mode 100644 Common/msal-node-wrapper/dist/middleware/context/AuthContext.d.ts.map delete mode 100644 Common/msal-node-wrapper/dist/middleware/context/AuthContext.esm.js delete mode 100644 Common/msal-node-wrapper/dist/middleware/context/AuthContext.esm.js.map delete mode 100644 Common/msal-node-wrapper/dist/middleware/context/AuthContext.js delete mode 100644 Common/msal-node-wrapper/dist/middleware/context/AuthContext.js.map delete mode 100644 Common/msal-node-wrapper/dist/middleware/errorMiddleware.d.ts delete mode 100644 Common/msal-node-wrapper/dist/middleware/errorMiddleware.d.ts.map delete mode 100644 Common/msal-node-wrapper/dist/middleware/errorMiddleware.esm.js delete mode 100644 Common/msal-node-wrapper/dist/middleware/errorMiddleware.esm.js.map delete mode 100644 Common/msal-node-wrapper/dist/middleware/errorMiddleware.js delete mode 100644 Common/msal-node-wrapper/dist/middleware/errorMiddleware.js.map delete mode 100644 Common/msal-node-wrapper/dist/middleware/guardMiddleware.d.ts delete mode 100644 Common/msal-node-wrapper/dist/middleware/guardMiddleware.d.ts.map delete mode 100644 Common/msal-node-wrapper/dist/middleware/guardMiddleware.esm.js delete mode 100644 Common/msal-node-wrapper/dist/middleware/guardMiddleware.esm.js.map delete mode 100644 Common/msal-node-wrapper/dist/middleware/guardMiddleware.js delete mode 100644 Common/msal-node-wrapper/dist/middleware/guardMiddleware.js.map delete mode 100644 Common/msal-node-wrapper/dist/middleware/handlers/acquireTokenHandler.d.ts delete mode 100644 Common/msal-node-wrapper/dist/middleware/handlers/acquireTokenHandler.d.ts.map delete mode 100644 Common/msal-node-wrapper/dist/middleware/handlers/acquireTokenHandler.esm.js delete mode 100644 Common/msal-node-wrapper/dist/middleware/handlers/acquireTokenHandler.esm.js.map delete mode 100644 Common/msal-node-wrapper/dist/middleware/handlers/acquireTokenHandler.js delete mode 100644 Common/msal-node-wrapper/dist/middleware/handlers/acquireTokenHandler.js.map delete mode 100644 Common/msal-node-wrapper/dist/middleware/handlers/loginHandler.d.ts delete mode 100644 Common/msal-node-wrapper/dist/middleware/handlers/loginHandler.d.ts.map delete mode 100644 Common/msal-node-wrapper/dist/middleware/handlers/loginHandler.esm.js delete mode 100644 Common/msal-node-wrapper/dist/middleware/handlers/loginHandler.esm.js.map delete mode 100644 Common/msal-node-wrapper/dist/middleware/handlers/loginHandler.js delete mode 100644 Common/msal-node-wrapper/dist/middleware/handlers/loginHandler.js.map delete mode 100644 Common/msal-node-wrapper/dist/middleware/handlers/logoutHandler.d.ts delete mode 100644 Common/msal-node-wrapper/dist/middleware/handlers/logoutHandler.d.ts.map delete mode 100644 Common/msal-node-wrapper/dist/middleware/handlers/logoutHandler.esm.js delete mode 100644 Common/msal-node-wrapper/dist/middleware/handlers/logoutHandler.esm.js.map delete mode 100644 Common/msal-node-wrapper/dist/middleware/handlers/logoutHandler.js delete mode 100644 Common/msal-node-wrapper/dist/middleware/handlers/logoutHandler.js.map delete mode 100644 Common/msal-node-wrapper/dist/middleware/handlers/redirectHandler.d.ts delete mode 100644 Common/msal-node-wrapper/dist/middleware/handlers/redirectHandler.d.ts.map delete mode 100644 Common/msal-node-wrapper/dist/middleware/handlers/redirectHandler.esm.js delete mode 100644 Common/msal-node-wrapper/dist/middleware/handlers/redirectHandler.esm.js.map delete mode 100644 Common/msal-node-wrapper/dist/middleware/handlers/redirectHandler.js delete mode 100644 Common/msal-node-wrapper/dist/middleware/handlers/redirectHandler.js.map delete mode 100644 Common/msal-node-wrapper/dist/network/FetchManager.d.ts delete mode 100644 Common/msal-node-wrapper/dist/network/FetchManager.d.ts.map delete mode 100644 Common/msal-node-wrapper/dist/network/FetchManager.esm.js delete mode 100644 Common/msal-node-wrapper/dist/network/FetchManager.esm.js.map delete mode 100644 Common/msal-node-wrapper/dist/network/FetchManager.js delete mode 100644 Common/msal-node-wrapper/dist/network/FetchManager.js.map delete mode 100644 Common/msal-node-wrapper/dist/packageMetadata.d.ts delete mode 100644 Common/msal-node-wrapper/dist/packageMetadata.d.ts.map delete mode 100644 Common/msal-node-wrapper/dist/packageMetadata.esm.js delete mode 100644 Common/msal-node-wrapper/dist/packageMetadata.esm.js.map delete mode 100644 Common/msal-node-wrapper/dist/packageMetadata.js delete mode 100644 Common/msal-node-wrapper/dist/packageMetadata.js.map delete mode 100644 Common/msal-node-wrapper/dist/provider/BaseAuthProvider.d.ts delete mode 100644 Common/msal-node-wrapper/dist/provider/BaseAuthProvider.d.ts.map delete mode 100644 Common/msal-node-wrapper/dist/provider/BaseAuthProvider.esm.js delete mode 100644 Common/msal-node-wrapper/dist/provider/BaseAuthProvider.esm.js.map delete mode 100644 Common/msal-node-wrapper/dist/provider/BaseAuthProvider.js delete mode 100644 Common/msal-node-wrapper/dist/provider/BaseAuthProvider.js.map delete mode 100644 Common/msal-node-wrapper/dist/provider/WebAppAuthProvider.d.ts delete mode 100644 Common/msal-node-wrapper/dist/provider/WebAppAuthProvider.d.ts.map delete mode 100644 Common/msal-node-wrapper/dist/provider/WebAppAuthProvider.esm.js delete mode 100644 Common/msal-node-wrapper/dist/provider/WebAppAuthProvider.esm.js.map delete mode 100644 Common/msal-node-wrapper/dist/provider/WebAppAuthProvider.js delete mode 100644 Common/msal-node-wrapper/dist/provider/WebAppAuthProvider.js.map delete mode 100644 Common/msal-node-wrapper/dist/utils/Constants.d.ts delete mode 100644 Common/msal-node-wrapper/dist/utils/Constants.d.ts.map delete mode 100644 Common/msal-node-wrapper/dist/utils/Constants.esm.js delete mode 100644 Common/msal-node-wrapper/dist/utils/Constants.esm.js.map delete mode 100644 Common/msal-node-wrapper/dist/utils/Constants.js delete mode 100644 Common/msal-node-wrapper/dist/utils/Constants.js.map delete mode 100644 Common/msal-node-wrapper/dist/utils/UrlUtils.d.ts delete mode 100644 Common/msal-node-wrapper/dist/utils/UrlUtils.d.ts.map delete mode 100644 Common/msal-node-wrapper/dist/utils/UrlUtils.esm.js delete mode 100644 Common/msal-node-wrapper/dist/utils/UrlUtils.esm.js.map delete mode 100644 Common/msal-node-wrapper/dist/utils/UrlUtils.js delete mode 100644 Common/msal-node-wrapper/dist/utils/UrlUtils.js.map diff --git a/Common/msal-node-wrapper/.gitignore b/Common/msal-node-wrapper/.gitignore index c12e25a..43fe68a 100644 --- a/Common/msal-node-wrapper/.gitignore +++ b/Common/msal-node-wrapper/.gitignore @@ -104,3 +104,6 @@ typings/ # e2e test screenshots screenshots/ + +# distributables +dist/ diff --git a/Common/msal-node-wrapper/dist/config/ConfigurationHelper.d.ts b/Common/msal-node-wrapper/dist/config/ConfigurationHelper.d.ts deleted file mode 100644 index fbcd3e3..0000000 --- a/Common/msal-node-wrapper/dist/config/ConfigurationHelper.d.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { Configuration } from "@azure/msal-node"; -import { AuthConfig, AppType, ProtectedResourcesMap } from "./ConfigurationTypes"; -export declare class ConfigurationHelper { - /** - * Maps the custom configuration object to configuration - * object expected by MSAL Node ConfidentialClientApplication class - * @param {AuthConfig} authConfig: configuration object - * @returns {Configuration} - */ - static getMsalConfiguration(authConfig: AuthConfig): Configuration; - /** - * Validates the fields in the config object - * @param {AuthConfig} authConfig: configuration object - * @param {AppType} appType: type of application - */ - static validateAuthConfig(authConfig: AuthConfig, appType: AppType): void; - /** - * Indicates whether the given authority is a B2C authority - * @param authority - * @returns - */ - static isB2CAuthority(authority: string): boolean; - /** - * Returns the tenantId associated with the authority string - * @param {string} authority: authority string - * @returns {string} - */ - static getTenantIdFromAuthority(authority: string): string; - /** - * Returns the instance associated with the authority string - * @param {string} authority: authority string - * @returns {string} - */ - static getInstanceFromAuthority(authority: string): string; - /** - * Util method to get the resource name for a given scope(s) - * @param {Array} scopes: an array of scopes from the token response - * @param {ProtectedResourcesMap} protectedResources: application authentication parameters - * @returns {string} - */ - static getResourceNameFromScopes(scopes: string[], protectedResources: ProtectedResourcesMap): string; - /** - * Util method to strip the default OIDC scopes from a given scopes list - * @param {Array} scopesList: full list of scopes for this resource - * @returns {Array} - */ - static getEffectiveScopes(scopesList: string[]): string[]; - /** - * Verifies if a given string is GUID - * @param {string} guid: string to be verified as GUID - * @returns {boolean} - */ - static isGuid(guid: string): boolean; -} -//# sourceMappingURL=ConfigurationHelper.d.ts.map \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/config/ConfigurationHelper.d.ts.map b/Common/msal-node-wrapper/dist/config/ConfigurationHelper.d.ts.map deleted file mode 100644 index 2d17b50..0000000 --- a/Common/msal-node-wrapper/dist/config/ConfigurationHelper.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ConfigurationHelper.d.ts","sourceRoot":"","sources":["../../src/config/ConfigurationHelper.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,EAAE,UAAU,EAAE,OAAO,EAA2B,qBAAqB,EAAoB,MAAM,sBAAsB,CAAC;AAE7H,qBAAa,mBAAmB;IAC5B;;;;;OAKG;IACH,MAAM,CAAC,oBAAoB,CAAC,UAAU,EAAE,UAAU,GAAG,aAAa;IAalE;;;;OAIG;IACH,MAAM,CAAC,kBAAkB,CAAC,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI;IAYzE;;;;OAIG;IACH,MAAM,CAAC,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO;IAIjD;;;;OAIG;IACH,MAAM,CAAC,wBAAwB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM;IAK1D;;;;OAIG;IACH,MAAM,CAAC,wBAAwB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM;IAK1D;;;;;OAKG;IACH,MAAM,CAAC,yBAAyB,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,kBAAkB,EAAE,qBAAqB,GAAG,MAAM;IAWrG;;;;OAIG;IACH,MAAM,CAAC,kBAAkB,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE;IAKzD;;;;OAIG;IACH,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;CAIvC"} \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/config/ConfigurationHelper.esm.js b/Common/msal-node-wrapper/dist/config/ConfigurationHelper.esm.js deleted file mode 100644 index 9a0db8f..0000000 --- a/Common/msal-node-wrapper/dist/config/ConfigurationHelper.esm.js +++ /dev/null @@ -1,104 +0,0 @@ -/*! msal-node-wrapper v1.0.0-beta 2023-06-25 */ -'use strict'; -import { DEFAULT_LOGGER_OPTIONS, ConfigurationErrorMessages, OIDC_SCOPES } from '../utils/Constants.esm.js'; -import { AppType } from './ConfigurationTypes.esm.js'; -import { StringUtils } from '../node_modules/@azure/msal-common/dist/utils/StringUtils.esm.js'; -import { UrlString } from '../node_modules/@azure/msal-common/dist/url/UrlString.esm.js'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -class ConfigurationHelper { - /** - * Maps the custom configuration object to configuration - * object expected by MSAL Node ConfidentialClientApplication class - * @param {AuthConfig} authConfig: configuration object - * @returns {Configuration} - */ - static getMsalConfiguration(authConfig) { - return { - auth: { - ...authConfig.auth, - authority: authConfig.auth?.authority ? authConfig.auth.authority : "https://login.microsoftonline.com/common", - }, - system: { - ...authConfig.system, - loggerOptions: authConfig.system?.loggerOptions ? authConfig.system.loggerOptions : DEFAULT_LOGGER_OPTIONS, - }, - }; - } - /** - * Validates the fields in the config object - * @param {AuthConfig} authConfig: configuration object - * @param {AppType} appType: type of application - */ - static validateAuthConfig(authConfig, appType) { - switch (appType) { - case AppType.WebApp: - if (StringUtils.isEmpty(authConfig.auth.redirectUri)) { - throw new Error(ConfigurationErrorMessages.NO_REDIRECT_URI); - } - break; - } - } - /** - * Indicates whether the given authority is a B2C authority - * @param authority - * @returns - */ - static isB2CAuthority(authority) { - return authority.includes("b2clogin.com/"); - } - /** - * Returns the tenantId associated with the authority string - * @param {string} authority: authority string - * @returns {string} - */ - static getTenantIdFromAuthority(authority) { - const canonicalAuthorityUri = UrlString.canonicalizeUri(authority); - return canonicalAuthorityUri.split("/").slice(-2)[0]; - } - /** - * Returns the instance associated with the authority string - * @param {string} authority: authority string - * @returns {string} - */ - static getInstanceFromAuthority(authority) { - const canonicalAuthorityUri = UrlString.canonicalizeUri(authority); - return canonicalAuthorityUri.split("/").slice(-3)[0]; - } - /** - * Util method to get the resource name for a given scope(s) - * @param {Array} scopes: an array of scopes from the token response - * @param {ProtectedResourcesMap} protectedResources: application authentication parameters - * @returns {string} - */ - static getResourceNameFromScopes(scopes, protectedResources) { - const effectiveScopes = this.getEffectiveScopes(scopes).map((scope) => scope.toLowerCase()); - const index = Object.values(protectedResources).findIndex((resourceParams) => effectiveScopes.every((scope) => resourceParams.scopes.includes(scope.toLowerCase()))); - const resourceName = Object.keys(protectedResources)[index]; - return resourceName; - } - /** - * Util method to strip the default OIDC scopes from a given scopes list - * @param {Array} scopesList: full list of scopes for this resource - * @returns {Array} - */ - static getEffectiveScopes(scopesList) { - const effectiveScopesList = scopesList.filter(scope => !OIDC_SCOPES.includes(scope)); - return effectiveScopesList; - } - /** - * Verifies if a given string is GUID - * @param {string} guid: string to be verified as GUID - * @returns {boolean} - */ - static isGuid(guid) { - const regexGuid = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i; - return regexGuid.test(guid); - } -} - -export { ConfigurationHelper }; -//# sourceMappingURL=ConfigurationHelper.esm.js.map diff --git a/Common/msal-node-wrapper/dist/config/ConfigurationHelper.esm.js.map b/Common/msal-node-wrapper/dist/config/ConfigurationHelper.esm.js.map deleted file mode 100644 index ac342cb..0000000 --- a/Common/msal-node-wrapper/dist/config/ConfigurationHelper.esm.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ConfigurationHelper.esm.js","sources":["../../src/config/ConfigurationHelper.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;AAAA;;;AAGG;MAOU,mBAAmB,CAAA;AAC5B;;;;;AAKG;IACH,OAAO,oBAAoB,CAAC,UAAsB,EAAA;QAC9C,OAAO;AACH,YAAA,IAAI,EAAE;gBACF,GAAG,UAAU,CAAC,IAAI;AAClB,gBAAA,SAAS,EAAE,UAAU,CAAC,IAAI,EAAE,SAAS,GAAG,UAAU,CAAC,IAAI,CAAC,SAAS,GAAG,0CAA0C;AACjH,aAAA;AACD,YAAA,MAAM,EAAE;gBACJ,GAAG,UAAU,CAAC,MAAM;AACpB,gBAAA,aAAa,EAAE,UAAU,CAAC,MAAM,EAAE,aAAa,GAAG,UAAU,CAAC,MAAM,CAAC,aAAa,GAAG,sBAAsB;AAC7G,aAAA;SACJ,CAAC;KACL;AAED;;;;AAIG;AACH,IAAA,OAAO,kBAAkB,CAAC,UAAsB,EAAE,OAAgB,EAAA;AAC9D,QAAA,QAAQ,OAAO;YACX,KAAK,OAAO,CAAC,MAAM;gBACf,IAAI,WAAW,CAAC,OAAO,CAAoB,UAAW,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE;AACtE,oBAAA,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,eAAe,CAAC,CAAC;AAC/D,iBAAA;gBACD,MAAM;AAGb,SAAA;KACJ;AAED;;;;AAIG;IACH,OAAO,cAAc,CAAC,SAAiB,EAAA;AACnC,QAAA,OAAO,SAAS,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;KAC9C;AAED;;;;AAIG;IACH,OAAO,wBAAwB,CAAC,SAAiB,EAAA;QAC7C,MAAM,qBAAqB,GAAG,SAAS,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;AACnE,QAAA,OAAO,qBAAqB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;KACxD;AAED;;;;AAIG;IACH,OAAO,wBAAwB,CAAC,SAAiB,EAAA;QAC7C,MAAM,qBAAqB,GAAG,SAAS,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;AACnE,QAAA,OAAO,qBAAqB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;KACxD;AAED;;;;;AAKG;AACH,IAAA,OAAO,yBAAyB,CAAC,MAAgB,EAAE,kBAAyC,EAAA;QACxF,MAAM,eAAe,GAAG,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,KAAK,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC;AAE5F,QAAA,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,SAAS,CAAC,CAAC,cAAuC,KAC9F,eAAe,CAAC,KAAK,CAAC,CAAC,KAAK,KAAK,cAAc,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC,CACxF,CAAC;QAEF,MAAM,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,KAAK,CAAC,CAAC;AAC5D,QAAA,OAAO,YAAY,CAAC;KACvB;AAED;;;;AAIG;IACH,OAAO,kBAAkB,CAAC,UAAoB,EAAA;AAC1C,QAAA,MAAM,mBAAmB,GAAG,UAAU,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;AACrF,QAAA,OAAO,mBAAmB,CAAC;KAC9B;AAED;;;;AAIG;IACH,OAAO,MAAM,CAAC,IAAY,EAAA;QACtB,MAAM,SAAS,GAAG,4EAA4E,CAAC;AAC/F,QAAA,OAAO,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KAC/B;AACJ;;;;"} \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/config/ConfigurationHelper.js b/Common/msal-node-wrapper/dist/config/ConfigurationHelper.js deleted file mode 100644 index 43a5d04..0000000 --- a/Common/msal-node-wrapper/dist/config/ConfigurationHelper.js +++ /dev/null @@ -1,106 +0,0 @@ -/*! msal-node-wrapper v1.0.0-beta 2023-06-25 */ -'use strict'; -'use strict'; - -var Constants = require('../utils/Constants.js'); -var ConfigurationTypes = require('./ConfigurationTypes.js'); -var StringUtils = require('../node_modules/@azure/msal-common/dist/utils/StringUtils.js'); -var UrlString = require('../node_modules/@azure/msal-common/dist/url/UrlString.js'); - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -class ConfigurationHelper { - /** - * Maps the custom configuration object to configuration - * object expected by MSAL Node ConfidentialClientApplication class - * @param {AuthConfig} authConfig: configuration object - * @returns {Configuration} - */ - static getMsalConfiguration(authConfig) { - return { - auth: { - ...authConfig.auth, - authority: authConfig.auth?.authority ? authConfig.auth.authority : "https://login.microsoftonline.com/common", - }, - system: { - ...authConfig.system, - loggerOptions: authConfig.system?.loggerOptions ? authConfig.system.loggerOptions : Constants.DEFAULT_LOGGER_OPTIONS, - }, - }; - } - /** - * Validates the fields in the config object - * @param {AuthConfig} authConfig: configuration object - * @param {AppType} appType: type of application - */ - static validateAuthConfig(authConfig, appType) { - switch (appType) { - case ConfigurationTypes.AppType.WebApp: - if (StringUtils.StringUtils.isEmpty(authConfig.auth.redirectUri)) { - throw new Error(Constants.ConfigurationErrorMessages.NO_REDIRECT_URI); - } - break; - } - } - /** - * Indicates whether the given authority is a B2C authority - * @param authority - * @returns - */ - static isB2CAuthority(authority) { - return authority.includes("b2clogin.com/"); - } - /** - * Returns the tenantId associated with the authority string - * @param {string} authority: authority string - * @returns {string} - */ - static getTenantIdFromAuthority(authority) { - const canonicalAuthorityUri = UrlString.UrlString.canonicalizeUri(authority); - return canonicalAuthorityUri.split("/").slice(-2)[0]; - } - /** - * Returns the instance associated with the authority string - * @param {string} authority: authority string - * @returns {string} - */ - static getInstanceFromAuthority(authority) { - const canonicalAuthorityUri = UrlString.UrlString.canonicalizeUri(authority); - return canonicalAuthorityUri.split("/").slice(-3)[0]; - } - /** - * Util method to get the resource name for a given scope(s) - * @param {Array} scopes: an array of scopes from the token response - * @param {ProtectedResourcesMap} protectedResources: application authentication parameters - * @returns {string} - */ - static getResourceNameFromScopes(scopes, protectedResources) { - const effectiveScopes = this.getEffectiveScopes(scopes).map((scope) => scope.toLowerCase()); - const index = Object.values(protectedResources).findIndex((resourceParams) => effectiveScopes.every((scope) => resourceParams.scopes.includes(scope.toLowerCase()))); - const resourceName = Object.keys(protectedResources)[index]; - return resourceName; - } - /** - * Util method to strip the default OIDC scopes from a given scopes list - * @param {Array} scopesList: full list of scopes for this resource - * @returns {Array} - */ - static getEffectiveScopes(scopesList) { - const effectiveScopesList = scopesList.filter(scope => !Constants.OIDC_SCOPES.includes(scope)); - return effectiveScopesList; - } - /** - * Verifies if a given string is GUID - * @param {string} guid: string to be verified as GUID - * @returns {boolean} - */ - static isGuid(guid) { - const regexGuid = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i; - return regexGuid.test(guid); - } -} - -exports.ConfigurationHelper = ConfigurationHelper; -//# sourceMappingURL=ConfigurationHelper.js.map diff --git a/Common/msal-node-wrapper/dist/config/ConfigurationHelper.js.map b/Common/msal-node-wrapper/dist/config/ConfigurationHelper.js.map deleted file mode 100644 index 84dbf1d..0000000 --- a/Common/msal-node-wrapper/dist/config/ConfigurationHelper.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ConfigurationHelper.js","sources":["../../src/config/ConfigurationHelper.ts"],"sourcesContent":[null],"names":["DEFAULT_LOGGER_OPTIONS","AppType","StringUtils","ConfigurationErrorMessages","UrlString","OIDC_SCOPES"],"mappings":";;;;;;;;;AAAA;;;AAGG;MAOU,mBAAmB,CAAA;AAC5B;;;;;AAKG;IACH,OAAO,oBAAoB,CAAC,UAAsB,EAAA;QAC9C,OAAO;AACH,YAAA,IAAI,EAAE;gBACF,GAAG,UAAU,CAAC,IAAI;AAClB,gBAAA,SAAS,EAAE,UAAU,CAAC,IAAI,EAAE,SAAS,GAAG,UAAU,CAAC,IAAI,CAAC,SAAS,GAAG,0CAA0C;AACjH,aAAA;AACD,YAAA,MAAM,EAAE;gBACJ,GAAG,UAAU,CAAC,MAAM;AACpB,gBAAA,aAAa,EAAE,UAAU,CAAC,MAAM,EAAE,aAAa,GAAG,UAAU,CAAC,MAAM,CAAC,aAAa,GAAGA,gCAAsB;AAC7G,aAAA;SACJ,CAAC;KACL;AAED;;;;AAIG;AACH,IAAA,OAAO,kBAAkB,CAAC,UAAsB,EAAE,OAAgB,EAAA;AAC9D,QAAA,QAAQ,OAAO;YACX,KAAKC,0BAAO,CAAC,MAAM;gBACf,IAAIC,uBAAW,CAAC,OAAO,CAAoB,UAAW,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE;AACtE,oBAAA,MAAM,IAAI,KAAK,CAACC,oCAA0B,CAAC,eAAe,CAAC,CAAC;AAC/D,iBAAA;gBACD,MAAM;AAGb,SAAA;KACJ;AAED;;;;AAIG;IACH,OAAO,cAAc,CAAC,SAAiB,EAAA;AACnC,QAAA,OAAO,SAAS,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;KAC9C;AAED;;;;AAIG;IACH,OAAO,wBAAwB,CAAC,SAAiB,EAAA;QAC7C,MAAM,qBAAqB,GAAGC,mBAAS,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;AACnE,QAAA,OAAO,qBAAqB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;KACxD;AAED;;;;AAIG;IACH,OAAO,wBAAwB,CAAC,SAAiB,EAAA;QAC7C,MAAM,qBAAqB,GAAGA,mBAAS,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;AACnE,QAAA,OAAO,qBAAqB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;KACxD;AAED;;;;;AAKG;AACH,IAAA,OAAO,yBAAyB,CAAC,MAAgB,EAAE,kBAAyC,EAAA;QACxF,MAAM,eAAe,GAAG,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,KAAK,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC;AAE5F,QAAA,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,SAAS,CAAC,CAAC,cAAuC,KAC9F,eAAe,CAAC,KAAK,CAAC,CAAC,KAAK,KAAK,cAAc,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC,CACxF,CAAC;QAEF,MAAM,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,KAAK,CAAC,CAAC;AAC5D,QAAA,OAAO,YAAY,CAAC;KACvB;AAED;;;;AAIG;IACH,OAAO,kBAAkB,CAAC,UAAoB,EAAA;AAC1C,QAAA,MAAM,mBAAmB,GAAG,UAAU,CAAC,MAAM,CAAC,KAAK,IAAI,CAACC,qBAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;AACrF,QAAA,OAAO,mBAAmB,CAAC;KAC9B;AAED;;;;AAIG;IACH,OAAO,MAAM,CAAC,IAAY,EAAA;QACtB,MAAM,SAAS,GAAG,4EAA4E,CAAC;AAC/F,QAAA,OAAO,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KAC/B;AACJ;;;;"} \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/config/ConfigurationTypes.d.ts b/Common/msal-node-wrapper/dist/config/ConfigurationTypes.d.ts deleted file mode 100644 index e2dfb7b..0000000 --- a/Common/msal-node-wrapper/dist/config/ConfigurationTypes.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { NodeAuthOptions, NodeSystemOptions, CacheOptions } from "@azure/msal-node"; -export type AuthConfig = { - auth: Omit; - system?: NodeSystemOptions; - cache?: CacheOptions; -}; -export type WebAppAuthConfig = AuthConfig & { - auth: NodeAuthOptions & AuthRoutes; -}; -export type AuthRoutes = { - redirectUri: string; - frontChannelLogoutUri?: string; - postLogoutRedirectUri?: string; -}; -export type ProtectedResourcesMap = Record; -export type ProtectedResourceParams = { - scopes: Array; - routes: Array; -}; -export declare enum AppType { - WebApp = 0 -} -//# sourceMappingURL=ConfigurationTypes.d.ts.map \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/config/ConfigurationTypes.d.ts.map b/Common/msal-node-wrapper/dist/config/ConfigurationTypes.d.ts.map deleted file mode 100644 index e3856a0..0000000 --- a/Common/msal-node-wrapper/dist/config/ConfigurationTypes.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ConfigurationTypes.d.ts","sourceRoot":"","sources":["../../src/config/ConfigurationTypes.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEpF,MAAM,MAAM,UAAU,GAAG;IACrB,IAAI,EAAE,IAAI,CAAC,eAAe,EAAE,mBAAmB,GAAG,iBAAiB,CAAC,CAAC;IACrE,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,KAAK,CAAC,EAAE,YAAY,CAAA;CACvB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG;IACxC,IAAI,EAAE,eAAe,GAAG,UAAU,CAAC;CACtC,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAClC,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,uBAAuB,CAAC,CAAC;AAE5E,MAAM,MAAM,uBAAuB,GAAG;IAClC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACtB,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;CACxB,CAAC;AAEF,oBAAY,OAAO;IACf,MAAM,IAAA;CACT"} \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/config/ConfigurationTypes.esm.js b/Common/msal-node-wrapper/dist/config/ConfigurationTypes.esm.js deleted file mode 100644 index 2e490bc..0000000 --- a/Common/msal-node-wrapper/dist/config/ConfigurationTypes.esm.js +++ /dev/null @@ -1,13 +0,0 @@ -/*! msal-node-wrapper v1.0.0-beta 2023-06-25 */ -'use strict'; -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -var AppType; -(function (AppType) { - AppType[AppType["WebApp"] = 0] = "WebApp"; -})(AppType || (AppType = {})); - -export { AppType }; -//# sourceMappingURL=ConfigurationTypes.esm.js.map diff --git a/Common/msal-node-wrapper/dist/config/ConfigurationTypes.esm.js.map b/Common/msal-node-wrapper/dist/config/ConfigurationTypes.esm.js.map deleted file mode 100644 index eb50c2b..0000000 --- a/Common/msal-node-wrapper/dist/config/ConfigurationTypes.esm.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ConfigurationTypes.esm.js","sources":["../../src/config/ConfigurationTypes.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;;;AAGG;IA2BS,QAEX;AAFD,CAAA,UAAY,OAAO,EAAA;AACf,IAAA,OAAA,CAAA,OAAA,CAAA,QAAA,CAAA,GAAA,CAAA,CAAA,GAAA,QAAM,CAAA;AACV,CAAC,EAFW,OAAO,KAAP,OAAO,GAElB,EAAA,CAAA,CAAA;;;;"} \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/config/ConfigurationTypes.js b/Common/msal-node-wrapper/dist/config/ConfigurationTypes.js deleted file mode 100644 index 2e79957..0000000 --- a/Common/msal-node-wrapper/dist/config/ConfigurationTypes.js +++ /dev/null @@ -1,13 +0,0 @@ -/*! msal-node-wrapper v1.0.0-beta 2023-06-25 */ -'use strict'; -'use strict'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -exports.AppType = void 0; -(function (AppType) { - AppType[AppType["WebApp"] = 0] = "WebApp"; -})(exports.AppType || (exports.AppType = {})); -//# sourceMappingURL=ConfigurationTypes.js.map diff --git a/Common/msal-node-wrapper/dist/config/ConfigurationTypes.js.map b/Common/msal-node-wrapper/dist/config/ConfigurationTypes.js.map deleted file mode 100644 index caa20bb..0000000 --- a/Common/msal-node-wrapper/dist/config/ConfigurationTypes.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ConfigurationTypes.js","sources":["../../src/config/ConfigurationTypes.ts"],"sourcesContent":[null],"names":["AppType"],"mappings":";;;;AAAA;;;AAGG;AA2BSA,yBAEX;AAFD,CAAA,UAAY,OAAO,EAAA;AACf,IAAA,OAAA,CAAA,OAAA,CAAA,QAAA,CAAA,GAAA,CAAA,CAAA,GAAA,QAAM,CAAA;AACV,CAAC,EAFWA,eAAO,KAAPA,eAAO,GAElB,EAAA,CAAA,CAAA;;"} \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/error/AccessDeniedError.d.ts b/Common/msal-node-wrapper/dist/error/AccessDeniedError.d.ts deleted file mode 100644 index b35405f..0000000 --- a/Common/msal-node-wrapper/dist/error/AccessDeniedError.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { AuthError, AccountInfo } from "@azure/msal-node"; -/** - * Contains string constants used by error codes and messages. - */ -export declare const AccessDeniedErrorMessage: { - unauthorizedAccessError: { - code: string; - desc: string; - }; - forbiddenAccessError: { - code: string; - desc: string; - }; -}; -/** - * Error thrown when the user is not authorized to access a route - */ -export declare class AccessDeniedError extends AuthError { - route?: string; - account?: AccountInfo; - constructor(errorCode: string, errorMessage?: string, route?: string, account?: AccountInfo); - /** - * Creates an error when access is unauthorized - * - * @returns {AccessDeniedError} Empty issuer error - */ - static createUnauthorizedAccessError(route?: string, account?: AccountInfo): AccessDeniedError; - /** - * Creates an error when the access is forbidden - * - * @returns {AccessDeniedError} Empty issuer error - */ - static createForbiddenAccessError(route?: string, account?: AccountInfo): AccessDeniedError; -} -//# sourceMappingURL=AccessDeniedError.d.ts.map \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/error/AccessDeniedError.d.ts.map b/Common/msal-node-wrapper/dist/error/AccessDeniedError.d.ts.map deleted file mode 100644 index 3acbed4..0000000 --- a/Common/msal-node-wrapper/dist/error/AccessDeniedError.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AccessDeniedError.d.ts","sourceRoot":"","sources":["../../src/error/AccessDeniedError.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE1D;;GAEG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;CASpC,CAAC;AAEF;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,SAAS;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,WAAW,CAAC;gBAEV,SAAS,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW;IAS3F;;;;OAIG;IACH,MAAM,CAAC,6BAA6B,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,iBAAiB;IAS9F;;;;OAIG;IACH,MAAM,CAAC,0BAA0B,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,iBAAiB;CAQ9F"} \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/error/AccessDeniedError.esm.js b/Common/msal-node-wrapper/dist/error/AccessDeniedError.esm.js deleted file mode 100644 index 2cb3db7..0000000 --- a/Common/msal-node-wrapper/dist/error/AccessDeniedError.esm.js +++ /dev/null @@ -1,52 +0,0 @@ -/*! msal-node-wrapper v1.0.0-beta 2023-06-25 */ -'use strict'; -import { AuthError } from '@azure/msal-node'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Contains string constants used by error codes and messages. - */ -const AccessDeniedErrorMessage = { - unauthorizedAccessError: { - code: "401", - desc: "Unauthorized" - }, - forbiddenAccessError: { - code: "403", - desc: "Forbidden" - } -}; -/** - * Error thrown when the user is not authorized to access a route - */ -class AccessDeniedError extends AuthError { - constructor(errorCode, errorMessage, route, account) { - super(errorCode, errorMessage); - this.name = "AccessDeniedError"; - this.route = route; - this.account = account; - Object.setPrototypeOf(this, AccessDeniedError.prototype); - } - /** - * Creates an error when access is unauthorized - * - * @returns {AccessDeniedError} Empty issuer error - */ - static createUnauthorizedAccessError(route, account) { - return new AccessDeniedError(AccessDeniedErrorMessage.unauthorizedAccessError.code, AccessDeniedErrorMessage.unauthorizedAccessError.desc, route, account); - } - /** - * Creates an error when the access is forbidden - * - * @returns {AccessDeniedError} Empty issuer error - */ - static createForbiddenAccessError(route, account) { - return new AccessDeniedError(AccessDeniedErrorMessage.forbiddenAccessError.code, AccessDeniedErrorMessage.forbiddenAccessError.desc, route, account); - } -} - -export { AccessDeniedError, AccessDeniedErrorMessage }; -//# sourceMappingURL=AccessDeniedError.esm.js.map diff --git a/Common/msal-node-wrapper/dist/error/AccessDeniedError.esm.js.map b/Common/msal-node-wrapper/dist/error/AccessDeniedError.esm.js.map deleted file mode 100644 index bc1b125..0000000 --- a/Common/msal-node-wrapper/dist/error/AccessDeniedError.esm.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AccessDeniedError.esm.js","sources":["../../src/error/AccessDeniedError.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAAA;;;AAGG;AAIH;;AAEG;AACU,MAAA,wBAAwB,GAAG;AACpC,IAAA,uBAAuB,EAAE;AACrB,QAAA,IAAI,EAAE,KAAK;AACX,QAAA,IAAI,EAAE,cAAc;AACvB,KAAA;AACD,IAAA,oBAAoB,EAAE;AAClB,QAAA,IAAI,EAAE,KAAK;AACX,QAAA,IAAI,EAAE,WAAW;AACpB,KAAA;EACH;AAEF;;AAEG;AACG,MAAO,iBAAkB,SAAQ,SAAS,CAAA;AAI5C,IAAA,WAAA,CAAY,SAAiB,EAAE,YAAqB,EAAE,KAAc,EAAE,OAAqB,EAAA;AACvF,QAAA,KAAK,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;AAC/B,QAAA,IAAI,CAAC,IAAI,GAAG,mBAAmB,CAAC;AAChC,QAAA,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;AACnB,QAAA,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QAEvB,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,iBAAiB,CAAC,SAAS,CAAC,CAAC;KAC5D;AAED;;;;AAIG;AACH,IAAA,OAAO,6BAA6B,CAAC,KAAc,EAAE,OAAqB,EAAA;AACtE,QAAA,OAAO,IAAI,iBAAiB,CACxB,wBAAwB,CAAC,uBAAuB,CAAC,IAAI,EACrD,wBAAwB,CAAC,uBAAuB,CAAC,IAAI,EACrD,KAAK,EACL,OAAO,CACV,CAAC;KACL;AAED;;;;AAIG;AACH,IAAA,OAAO,0BAA0B,CAAC,KAAc,EAAE,OAAqB,EAAA;AACnE,QAAA,OAAO,IAAI,iBAAiB,CACxB,wBAAwB,CAAC,oBAAoB,CAAC,IAAI,EAClD,wBAAwB,CAAC,oBAAoB,CAAC,IAAI,EAClD,KAAK,EACL,OAAO,CACV,CAAC;KACL;AACJ;;;;"} \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/error/AccessDeniedError.js b/Common/msal-node-wrapper/dist/error/AccessDeniedError.js deleted file mode 100644 index 3a4198d..0000000 --- a/Common/msal-node-wrapper/dist/error/AccessDeniedError.js +++ /dev/null @@ -1,55 +0,0 @@ -/*! msal-node-wrapper v1.0.0-beta 2023-06-25 */ -'use strict'; -'use strict'; - -var msalNode = require('@azure/msal-node'); - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Contains string constants used by error codes and messages. - */ -const AccessDeniedErrorMessage = { - unauthorizedAccessError: { - code: "401", - desc: "Unauthorized" - }, - forbiddenAccessError: { - code: "403", - desc: "Forbidden" - } -}; -/** - * Error thrown when the user is not authorized to access a route - */ -class AccessDeniedError extends msalNode.AuthError { - constructor(errorCode, errorMessage, route, account) { - super(errorCode, errorMessage); - this.name = "AccessDeniedError"; - this.route = route; - this.account = account; - Object.setPrototypeOf(this, AccessDeniedError.prototype); - } - /** - * Creates an error when access is unauthorized - * - * @returns {AccessDeniedError} Empty issuer error - */ - static createUnauthorizedAccessError(route, account) { - return new AccessDeniedError(AccessDeniedErrorMessage.unauthorizedAccessError.code, AccessDeniedErrorMessage.unauthorizedAccessError.desc, route, account); - } - /** - * Creates an error when the access is forbidden - * - * @returns {AccessDeniedError} Empty issuer error - */ - static createForbiddenAccessError(route, account) { - return new AccessDeniedError(AccessDeniedErrorMessage.forbiddenAccessError.code, AccessDeniedErrorMessage.forbiddenAccessError.desc, route, account); - } -} - -exports.AccessDeniedError = AccessDeniedError; -exports.AccessDeniedErrorMessage = AccessDeniedErrorMessage; -//# sourceMappingURL=AccessDeniedError.js.map diff --git a/Common/msal-node-wrapper/dist/error/AccessDeniedError.js.map b/Common/msal-node-wrapper/dist/error/AccessDeniedError.js.map deleted file mode 100644 index 727f5a9..0000000 --- a/Common/msal-node-wrapper/dist/error/AccessDeniedError.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AccessDeniedError.js","sources":["../../src/error/AccessDeniedError.ts"],"sourcesContent":[null],"names":["AuthError"],"mappings":";;;;;;AAAA;;;AAGG;AAIH;;AAEG;AACU,MAAA,wBAAwB,GAAG;AACpC,IAAA,uBAAuB,EAAE;AACrB,QAAA,IAAI,EAAE,KAAK;AACX,QAAA,IAAI,EAAE,cAAc;AACvB,KAAA;AACD,IAAA,oBAAoB,EAAE;AAClB,QAAA,IAAI,EAAE,KAAK;AACX,QAAA,IAAI,EAAE,WAAW;AACpB,KAAA;EACH;AAEF;;AAEG;AACG,MAAO,iBAAkB,SAAQA,kBAAS,CAAA;AAI5C,IAAA,WAAA,CAAY,SAAiB,EAAE,YAAqB,EAAE,KAAc,EAAE,OAAqB,EAAA;AACvF,QAAA,KAAK,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;AAC/B,QAAA,IAAI,CAAC,IAAI,GAAG,mBAAmB,CAAC;AAChC,QAAA,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;AACnB,QAAA,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QAEvB,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,iBAAiB,CAAC,SAAS,CAAC,CAAC;KAC5D;AAED;;;;AAIG;AACH,IAAA,OAAO,6BAA6B,CAAC,KAAc,EAAE,OAAqB,EAAA;AACtE,QAAA,OAAO,IAAI,iBAAiB,CACxB,wBAAwB,CAAC,uBAAuB,CAAC,IAAI,EACrD,wBAAwB,CAAC,uBAAuB,CAAC,IAAI,EACrD,KAAK,EACL,OAAO,CACV,CAAC;KACL;AAED;;;;AAIG;AACH,IAAA,OAAO,0BAA0B,CAAC,KAAc,EAAE,OAAqB,EAAA;AACnE,QAAA,OAAO,IAAI,iBAAiB,CACxB,wBAAwB,CAAC,oBAAoB,CAAC,IAAI,EAClD,wBAAwB,CAAC,oBAAoB,CAAC,IAAI,EAClD,KAAK,EACL,OAAO,CACV,CAAC;KACL;AACJ;;;;;"} \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/error/GroupsOverageError.d.ts b/Common/msal-node-wrapper/dist/error/GroupsOverageError.d.ts deleted file mode 100644 index 91bb331..0000000 --- a/Common/msal-node-wrapper/dist/error/GroupsOverageError.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { AccountInfo, AuthError } from "@azure/msal-node"; -/** - * Error thrown when groups overage claim is present in the ID token. - */ -export declare class GroupsOverageError extends AuthError { - account?: AccountInfo; - constructor(errorCode: string, errorMessage?: string, account?: AccountInfo); -} -//# sourceMappingURL=GroupsOverageError.d.ts.map \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/error/GroupsOverageError.d.ts.map b/Common/msal-node-wrapper/dist/error/GroupsOverageError.d.ts.map deleted file mode 100644 index fd5b251..0000000 --- a/Common/msal-node-wrapper/dist/error/GroupsOverageError.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GroupsOverageError.d.ts","sourceRoot":"","sources":["../../src/error/GroupsOverageError.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE1D;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,SAAS;IAE7C,OAAO,CAAC,EAAE,WAAW,CAAC;gBAEV,SAAS,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW;CAO9E"} \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/error/InteractionRequiredError.d.ts b/Common/msal-node-wrapper/dist/error/InteractionRequiredError.d.ts deleted file mode 100644 index c8df3b1..0000000 --- a/Common/msal-node-wrapper/dist/error/InteractionRequiredError.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { InteractionRequiredAuthError } from "@azure/msal-node"; -import { LoginOptions, TokenRequestOptions } from "../middleware/MiddlewareOptions"; -/** - * Error thrown when user interaction is required. - */ -export declare class InteractionRequiredError extends InteractionRequiredAuthError { - requestOptions: LoginOptions; - constructor(errorCode: string, errorMessage?: string, subError?: string, originalRequest?: TokenRequestOptions); -} -//# sourceMappingURL=InteractionRequiredError.d.ts.map \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/error/InteractionRequiredError.d.ts.map b/Common/msal-node-wrapper/dist/error/InteractionRequiredError.d.ts.map deleted file mode 100644 index e427b9a..0000000 --- a/Common/msal-node-wrapper/dist/error/InteractionRequiredError.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"InteractionRequiredError.d.ts","sourceRoot":"","sources":["../../src/error/InteractionRequiredError.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,4BAA4B,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAEpF;;GAEG;AACH,qBAAa,wBAAyB,SAAQ,4BAA4B;IACtE,cAAc,EAAE,YAAY,CAAC;gBAEjB,SAAS,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,eAAe,CAAC,EAAE,mBAAmB;CAkBjH"} \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/error/InteractionRequiredError.esm.js b/Common/msal-node-wrapper/dist/error/InteractionRequiredError.esm.js deleted file mode 100644 index 89c8b43..0000000 --- a/Common/msal-node-wrapper/dist/error/InteractionRequiredError.esm.js +++ /dev/null @@ -1,33 +0,0 @@ -/*! msal-node-wrapper v1.0.0-beta 2023-06-25 */ -'use strict'; -import { InteractionRequiredAuthError } from '@azure/msal-node'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Error thrown when user interaction is required. - */ -class InteractionRequiredError extends InteractionRequiredAuthError { - constructor(errorCode, errorMessage, subError, originalRequest) { - super(errorCode, errorMessage, subError); - this.name = "InteractionRequiredError"; - this.requestOptions = { - scopes: originalRequest?.scopes || [], - claims: originalRequest?.claims, - state: originalRequest?.state, - sid: originalRequest?.sid, - loginHint: originalRequest?.loginHint, - domainHint: originalRequest?.domainHint, - extraQueryParameters: originalRequest?.extraQueryParameters, - extraScopesToConsent: originalRequest?.extraScopesToConsent, - tokenBodyParameters: originalRequest?.tokenBodyParameters, - tokenQueryParameters: originalRequest?.tokenQueryParameters, - }; - Object.setPrototypeOf(this, InteractionRequiredError.prototype); - } -} - -export { InteractionRequiredError }; -//# sourceMappingURL=InteractionRequiredError.esm.js.map diff --git a/Common/msal-node-wrapper/dist/error/InteractionRequiredError.esm.js.map b/Common/msal-node-wrapper/dist/error/InteractionRequiredError.esm.js.map deleted file mode 100644 index 57d799c..0000000 --- a/Common/msal-node-wrapper/dist/error/InteractionRequiredError.esm.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"InteractionRequiredError.esm.js","sources":["../../src/error/InteractionRequiredError.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAAA;;;AAGG;AAKH;;AAEG;AACG,MAAO,wBAAyB,SAAQ,4BAA4B,CAAA;AAGtE,IAAA,WAAA,CAAY,SAAiB,EAAE,YAAqB,EAAE,QAAiB,EAAE,eAAqC,EAAA;AAC1G,QAAA,KAAK,CAAC,SAAS,EAAE,YAAY,EAAE,QAAQ,CAAC,CAAC;AACzC,QAAA,IAAI,CAAC,IAAI,GAAG,0BAA0B,CAAC;QACvC,IAAI,CAAC,cAAc,GAAG;AAClB,YAAA,MAAM,EAAE,eAAe,EAAE,MAAM,IAAI,EAAE;YACrC,MAAM,EAAE,eAAe,EAAE,MAAM;YAC/B,KAAK,EAAE,eAAe,EAAE,KAAK;YAC7B,GAAG,EAAE,eAAe,EAAE,GAAG;YACzB,SAAS,EAAE,eAAe,EAAE,SAAS;YACrC,UAAU,EAAE,eAAe,EAAE,UAAU;YACvC,oBAAoB,EAAE,eAAe,EAAE,oBAAoB;YAC3D,oBAAoB,EAAE,eAAe,EAAE,oBAAoB;YAC3D,mBAAmB,EAAE,eAAe,EAAE,mBAAmB;YACzD,oBAAoB,EAAE,eAAe,EAAE,oBAAoB;SAC9D,CAAC;QAEF,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,wBAAwB,CAAC,SAAS,CAAC,CAAC;KACnE;AACJ;;;;"} \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/error/InteractionRequiredError.js b/Common/msal-node-wrapper/dist/error/InteractionRequiredError.js deleted file mode 100644 index 90ccce1..0000000 --- a/Common/msal-node-wrapper/dist/error/InteractionRequiredError.js +++ /dev/null @@ -1,35 +0,0 @@ -/*! msal-node-wrapper v1.0.0-beta 2023-06-25 */ -'use strict'; -'use strict'; - -var msalNode = require('@azure/msal-node'); - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Error thrown when user interaction is required. - */ -class InteractionRequiredError extends msalNode.InteractionRequiredAuthError { - constructor(errorCode, errorMessage, subError, originalRequest) { - super(errorCode, errorMessage, subError); - this.name = "InteractionRequiredError"; - this.requestOptions = { - scopes: originalRequest?.scopes || [], - claims: originalRequest?.claims, - state: originalRequest?.state, - sid: originalRequest?.sid, - loginHint: originalRequest?.loginHint, - domainHint: originalRequest?.domainHint, - extraQueryParameters: originalRequest?.extraQueryParameters, - extraScopesToConsent: originalRequest?.extraScopesToConsent, - tokenBodyParameters: originalRequest?.tokenBodyParameters, - tokenQueryParameters: originalRequest?.tokenQueryParameters, - }; - Object.setPrototypeOf(this, InteractionRequiredError.prototype); - } -} - -exports.InteractionRequiredError = InteractionRequiredError; -//# sourceMappingURL=InteractionRequiredError.js.map diff --git a/Common/msal-node-wrapper/dist/error/InteractionRequiredError.js.map b/Common/msal-node-wrapper/dist/error/InteractionRequiredError.js.map deleted file mode 100644 index 4df11ea..0000000 --- a/Common/msal-node-wrapper/dist/error/InteractionRequiredError.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"InteractionRequiredError.js","sources":["../../src/error/InteractionRequiredError.ts"],"sourcesContent":[null],"names":["InteractionRequiredAuthError"],"mappings":";;;;;;AAAA;;;AAGG;AAKH;;AAEG;AACG,MAAO,wBAAyB,SAAQA,qCAA4B,CAAA;AAGtE,IAAA,WAAA,CAAY,SAAiB,EAAE,YAAqB,EAAE,QAAiB,EAAE,eAAqC,EAAA;AAC1G,QAAA,KAAK,CAAC,SAAS,EAAE,YAAY,EAAE,QAAQ,CAAC,CAAC;AACzC,QAAA,IAAI,CAAC,IAAI,GAAG,0BAA0B,CAAC;QACvC,IAAI,CAAC,cAAc,GAAG;AAClB,YAAA,MAAM,EAAE,eAAe,EAAE,MAAM,IAAI,EAAE;YACrC,MAAM,EAAE,eAAe,EAAE,MAAM;YAC/B,KAAK,EAAE,eAAe,EAAE,KAAK;YAC7B,GAAG,EAAE,eAAe,EAAE,GAAG;YACzB,SAAS,EAAE,eAAe,EAAE,SAAS;YACrC,UAAU,EAAE,eAAe,EAAE,UAAU;YACvC,oBAAoB,EAAE,eAAe,EAAE,oBAAoB;YAC3D,oBAAoB,EAAE,eAAe,EAAE,oBAAoB;YAC3D,mBAAmB,EAAE,eAAe,EAAE,mBAAmB;YACzD,oBAAoB,EAAE,eAAe,EAAE,oBAAoB;SAC9D,CAAC;QAEF,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,wBAAwB,CAAC,SAAS,CAAC,CAAC;KACnE;AACJ;;;;"} \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/index.d.ts.map b/Common/msal-node-wrapper/dist/index.d.ts.map deleted file mode 100644 index 7bfbf76..0000000 --- a/Common/msal-node-wrapper/dist/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAC/F,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAE/D,OAAO,QAAQ,iBAAiB,CAAC;IAC7B,UAAU,WAAW;QACjB,OAAO,EAAE,WAAW,CAAC;QACrB,eAAe,EAAE,OAAO,CAAC;QACzB,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAA;QACxD,kBAAkB,EAAE,wBAAwB,CAAC;QAC7C,UAAU,CAAC,EAAE,MAAM,CAAC;KACvB;CACJ;AAED,OAAO,CAAC,MAAM,CAAC;IAEX,UAAU,OAAO,CAAC;QACd,UAAiB,OAAO;YACpB,WAAW,EAAE,WAAW,CAAC;SAC5B;KACJ;CACJ;AAED,OAAO,EACH,4BAA4B,EAC5B,iBAAiB,EACjB,SAAS,EACT,MAAM,EACN,WAAW,EACd,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAEnE,OAAO,EACH,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,uBAAuB,EACvB,qBAAqB,EACxB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EACH,iBAAiB,EACjB,6BAA6B,EAC7B,YAAY,EACZ,aAAa,EACb,mBAAmB,EACnB,QAAQ,EACR,aAAa,EAChB,MAAM,gCAAgC,CAAC;AAExC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC"} \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/index.esm.js b/Common/msal-node-wrapper/dist/index.esm.js deleted file mode 100644 index 420079d..0000000 --- a/Common/msal-node-wrapper/dist/index.esm.js +++ /dev/null @@ -1,6 +0,0 @@ -/*! msal-node-wrapper v1.0.0-beta 2023-06-25 */ -'use strict'; -export { AuthError, InteractionRequiredAuthError, Logger } from '@azure/msal-node'; -export { WebAppAuthProvider } from './provider/WebAppAuthProvider.esm.js'; -export { packageVersion } from './packageMetadata.esm.js'; -//# sourceMappingURL=index.esm.js.map diff --git a/Common/msal-node-wrapper/dist/index.esm.js.map b/Common/msal-node-wrapper/dist/index.esm.js.map deleted file mode 100644 index b94bb8f..0000000 --- a/Common/msal-node-wrapper/dist/index.esm.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"} \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/index.js b/Common/msal-node-wrapper/dist/index.js deleted file mode 100644 index a07e713..0000000 --- a/Common/msal-node-wrapper/dist/index.js +++ /dev/null @@ -1,25 +0,0 @@ -/*! msal-node-wrapper v1.0.0-beta 2023-06-25 */ -'use strict'; -'use strict'; - -var msalNode = require('@azure/msal-node'); -var WebAppAuthProvider = require('./provider/WebAppAuthProvider.js'); -var packageMetadata = require('./packageMetadata.js'); - - - -Object.defineProperty(exports, 'AuthError', { - enumerable: true, - get: function () { return msalNode.AuthError; } -}); -Object.defineProperty(exports, 'InteractionRequiredAuthError', { - enumerable: true, - get: function () { return msalNode.InteractionRequiredAuthError; } -}); -Object.defineProperty(exports, 'Logger', { - enumerable: true, - get: function () { return msalNode.Logger; } -}); -exports.WebAppAuthProvider = WebAppAuthProvider.WebAppAuthProvider; -exports.packageVersion = packageMetadata.packageVersion; -//# sourceMappingURL=index.js.map diff --git a/Common/msal-node-wrapper/dist/index.js.map b/Common/msal-node-wrapper/dist/index.js.map deleted file mode 100644 index 5b6ca74..0000000 --- a/Common/msal-node-wrapper/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/middleware/MiddlewareOptions.d.ts b/Common/msal-node-wrapper/dist/middleware/MiddlewareOptions.d.ts deleted file mode 100644 index 9dbd65e..0000000 --- a/Common/msal-node-wrapper/dist/middleware/MiddlewareOptions.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { CommonEndSessionRequest, TokenClaims } from "@azure/msal-common"; -import { AuthorizationUrlRequest, AuthorizationCodeRequest, AccountInfo } from "@azure/msal-node"; -import { ProtectedResourcesMap } from "../config/ConfigurationTypes"; -export type AuthenticateMiddlewareOptions = { - protectAllRoutes?: boolean; - acquireTokenForResources?: ProtectedResourcesMap; -}; -export type LoginOptions = Pick & Pick & { - postLoginRedirectUri?: string; - postFailureRedirectUri?: string; -}; -export type LogoutOptions = Pick & { - postLogoutRedirectUri?: string; - idpLogout?: boolean; - clearCache?: boolean; -}; -export type TokenRequestOptions = LoginOptions & { - account?: AccountInfo; -}; -export type TokenRequestMiddlewareOptions = { - resourceName: string; -}; -export type RouteGuardOptions = { - forceLogin?: boolean; - postLoginRedirectUri?: string; - postFailureRedirectUri?: string; - idTokenClaims?: IdTokenClaims; -}; -export type AppState = { - redirectTo: string; - customState?: string; -}; -export type IdTokenClaims = TokenClaims & { - aud?: string; - roles?: string[]; - groups?: string[]; - _claim_names?: string[]; - _claim_sources?: string[]; - xms_cc?: string; - acrs?: string[]; - [key: string]: string | number | string[] | object | undefined | unknown; -}; -//# sourceMappingURL=MiddlewareOptions.d.ts.map \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/middleware/MiddlewareOptions.d.ts.map b/Common/msal-node-wrapper/dist/middleware/MiddlewareOptions.d.ts.map deleted file mode 100644 index 9d712ad..0000000 --- a/Common/msal-node-wrapper/dist/middleware/MiddlewareOptions.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"MiddlewareOptions.d.ts","sourceRoot":"","sources":["../../src/middleware/MiddlewareOptions.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,uBAAuB,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAClG,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAErE,MAAM,MAAM,6BAA6B,GAAG;IACxC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,wBAAwB,CAAC,EAAE,qBAAqB,CAAA;CACnD,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC,wBAAwB,EAAE,QAAQ,GAAG,QAAQ,GAAG,qBAAqB,GAAG,sBAAsB,CAAC,GAAG,IAAI,CAAC,uBAAuB,EAAE,QAAQ,GAAG,SAAS,GAAG,WAAW,GAAG,YAAY,GAAG,OAAO,GAAG,sBAAsB,GAAG,sBAAsB,GAAG,QAAQ,GAAG,KAAK,CAAC,GAAG;IAChS,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACnC,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,uBAAuB,EAAE,SAAS,GAAG,OAAO,GAAG,uBAAuB,GAAG,YAAY,GAAG,sBAAsB,CAAC,GAAG;IAC/I,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,YAAY,GAAG;IAC7C,OAAO,CAAC,EAAE,WAAW,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG;IACxC,YAAY,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,aAAa,CAAC,EAAE,aAAa,CAAC;CACjC,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,WAAW,GAAG;IACtC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC;CAC5E,CAAC"} \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/middleware/authenticateMiddleware.d.ts b/Common/msal-node-wrapper/dist/middleware/authenticateMiddleware.d.ts deleted file mode 100644 index 70d33bc..0000000 --- a/Common/msal-node-wrapper/dist/middleware/authenticateMiddleware.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Router } from "express"; -import { WebAppAuthProvider } from "../provider/WebAppAuthProvider"; -import { AuthenticateMiddlewareOptions } from "./MiddlewareOptions"; -declare function authenticateMiddleware(this: WebAppAuthProvider, options: AuthenticateMiddlewareOptions): Router; -export default authenticateMiddleware; -//# sourceMappingURL=authenticateMiddleware.d.ts.map \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/middleware/authenticateMiddleware.d.ts.map b/Common/msal-node-wrapper/dist/middleware/authenticateMiddleware.d.ts.map deleted file mode 100644 index 2038e74..0000000 --- a/Common/msal-node-wrapper/dist/middleware/authenticateMiddleware.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"authenticateMiddleware.d.ts","sourceRoot":"","sources":["../../src/middleware/authenticateMiddleware.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,6BAA6B,EAAE,MAAM,qBAAqB,CAAC;AAOpE,iBAAS,sBAAsB,CAC3B,IAAI,EAAE,kBAAkB,EACxB,OAAO,EAAE,6BAA6B,GACvC,MAAM,CAuER;AAED,eAAe,sBAAsB,CAAC"} \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/middleware/authenticateMiddleware.esm.js b/Common/msal-node-wrapper/dist/middleware/authenticateMiddleware.esm.js deleted file mode 100644 index 451befd..0000000 --- a/Common/msal-node-wrapper/dist/middleware/authenticateMiddleware.esm.js +++ /dev/null @@ -1,73 +0,0 @@ -/*! msal-node-wrapper v1.0.0-beta 2023-06-25 */ -'use strict'; -import { Router } from 'express'; -import { UrlUtils } from '../utils/UrlUtils.esm.js'; -import { ErrorMessages } from '../utils/Constants.esm.js'; -import { AuthContext } from './context/AuthContext.esm.js'; -import redirectHandler from './handlers/redirectHandler.esm.js'; -import acquireTokenHandler from './handlers/acquireTokenHandler.esm.js'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -function authenticateMiddleware(options) { - const appRouter = Router(); - // ensure session is available - appRouter.use((req, res, next) => { - if (!req.session) { - throw new Error(ErrorMessages.SESSION_NOT_FOUND); - } - if (!req.authContext) { - req.authContext = new AuthContext(this, { req, res, next }); - } - next(); - }); - appRouter.post(UrlUtils.getPathFromUrl(this.webAppAuthConfig.auth.redirectUri), redirectHandler.call(this)); - if (this.webAppAuthConfig.auth.frontChannelLogoutUri) { - /** - * Expose front-channel logout route. For more information, visit: - * https://docs.microsoft.com/azure/active-directory/develop/v2-protocols-oidc#single-sign-out - */ - appRouter.get(UrlUtils.getPathFromUrl(this.webAppAuthConfig.auth.frontChannelLogoutUri), (req, res, next) => { - if (req.authContext.isAuthenticated()) { - return req.authContext.logout({ - postLogoutRedirectUri: "/", - idpLogout: false - })(req, res, next); - } - return res.status(401).send("Unauthorized"); - }); - } - if (options.protectAllRoutes) { - appRouter.use((req, res, next) => { - if (!req.authContext.isAuthenticated()) { - return req.authContext.login({ - postLoginRedirectUri: req.originalUrl, - scopes: [], - })(req, res, next); - } - return next(); - }); - } - if (options.acquireTokenForResources) { - const resources = Object.entries(options.acquireTokenForResources); - for (const resource of resources) { - const [resourceName, resourceParams] = resource; - resourceParams.routes.forEach((route) => { - appRouter.use(route, (req, res, next) => { - if (req.authContext.getCachedTokenForResource(resourceName)) { - this.getLogger().verbose("Cached token found for resource endpoint"); - return next(); - } - this.getLogger().verbose("Acquiring token for resource: ", resourceName); - return acquireTokenHandler.call(this, { scopes: resourceParams.scopes }, { resourceName })(req, res, next); - }); - }); - } - } - return appRouter; -} - -export { authenticateMiddleware as default }; -//# sourceMappingURL=authenticateMiddleware.esm.js.map diff --git a/Common/msal-node-wrapper/dist/middleware/authenticateMiddleware.esm.js.map b/Common/msal-node-wrapper/dist/middleware/authenticateMiddleware.esm.js.map deleted file mode 100644 index 1798d06..0000000 --- a/Common/msal-node-wrapper/dist/middleware/authenticateMiddleware.esm.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"authenticateMiddleware.esm.js","sources":["../../src/middleware/authenticateMiddleware.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;AAAA;;;AAGG;AAWH,SAAS,sBAAsB,CAE3B,OAAsC,EAAA;AAEtC,IAAA,MAAM,SAAS,GAAG,MAAM,EAAE,CAAC;;IAG3B,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,KAAI;AAC7B,QAAA,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE;AACd,YAAA,MAAM,IAAI,KAAK,CAAC,aAAa,CAAC,iBAAiB,CAAC,CAAC;AACpD,SAAA;AAED,QAAA,IAAI,CAAC,GAAG,CAAC,WAAW,EAAE;AAClB,YAAA,GAAG,CAAC,WAAW,GAAG,IAAI,WAAW,CAAC,IAAI,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC;AAC/D,SAAA;AAED,QAAA,IAAI,EAAE,CAAC;AACX,KAAC,CAAC,CAAC;IAEH,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AAE5G,IAAA,IAAI,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,qBAAqB,EAAE;AAClD;;;AAGG;QACH,SAAS,CAAC,GAAG,CACT,QAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,qBAAqB,CAAC,EACzE,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,KAAI;AACf,YAAA,IAAI,GAAG,CAAC,WAAW,CAAC,eAAe,EAAE,EAAE;AACnC,gBAAA,OAAO,GAAG,CAAC,WAAW,CAAC,MAAM,CAAC;AAC1B,oBAAA,qBAAqB,EAAE,GAAG;AAC1B,oBAAA,SAAS,EAAE,KAAK;AACnB,iBAAA,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;AACtB,aAAA;YAED,OAAO,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;AAChD,SAAC,CAAC,CAAC;AACV,KAAA;IAED,IAAI,OAAO,CAAC,gBAAgB,EAAE;QAC1B,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,KAAI;AAC7B,YAAA,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,eAAe,EAAE,EAAE;AACpC,gBAAA,OAAO,GAAG,CAAC,WAAW,CAAC,KAAK,CAAC;oBACzB,oBAAoB,EAAE,GAAG,CAAC,WAAW;AACrC,oBAAA,MAAM,EAAE,EAAE;AACb,iBAAA,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;AACtB,aAAA;YAED,OAAO,IAAI,EAAE,CAAC;AAClB,SAAC,CAAC,CAAC;AACN,KAAA;IAED,IAAI,OAAO,CAAC,wBAAwB,EAAE;QAClC,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,wBAAwB,CAAC,CAAC;AAEnE,QAAA,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE;AAC9B,YAAA,MAAM,CAAC,YAAY,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC;YAEhD,cAAc,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,KAAK,KAAI;AACpC,gBAAA,SAAS,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,KAAI;oBACpC,IAAI,GAAG,CAAC,WAAW,CAAC,yBAAyB,CAAC,YAAY,CAAC,EAAE;wBACzD,IAAI,CAAC,SAAS,EAAE,CAAC,OAAO,CAAC,0CAA0C,CAAC,CAAC;wBACrE,OAAO,IAAI,EAAE,CAAC;AACjB,qBAAA;oBAED,IAAI,CAAC,SAAS,EAAE,CAAC,OAAO,CAAC,gCAAgC,EAAE,YAAY,CAAC,CAAC;oBACzE,OAAO,mBAAmB,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,cAAc,CAAC,MAAM,EAAE,EAAE,EAAE,YAAY,EAAE,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;AAC/G,iBAAC,CAAC,CAAC;AACP,aAAC,CAAC,CAAC;AACN,SAAA;AACJ,KAAA;AAED,IAAA,OAAO,SAAS,CAAC;AACrB;;;;"} \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/middleware/authenticateMiddleware.js b/Common/msal-node-wrapper/dist/middleware/authenticateMiddleware.js deleted file mode 100644 index 370dc74..0000000 --- a/Common/msal-node-wrapper/dist/middleware/authenticateMiddleware.js +++ /dev/null @@ -1,75 +0,0 @@ -/*! msal-node-wrapper v1.0.0-beta 2023-06-25 */ -'use strict'; -'use strict'; - -var express = require('express'); -var UrlUtils = require('../utils/UrlUtils.js'); -var Constants = require('../utils/Constants.js'); -var AuthContext = require('./context/AuthContext.js'); -var redirectHandler = require('./handlers/redirectHandler.js'); -var acquireTokenHandler = require('./handlers/acquireTokenHandler.js'); - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -function authenticateMiddleware(options) { - const appRouter = express.Router(); - // ensure session is available - appRouter.use((req, res, next) => { - if (!req.session) { - throw new Error(Constants.ErrorMessages.SESSION_NOT_FOUND); - } - if (!req.authContext) { - req.authContext = new AuthContext.AuthContext(this, { req, res, next }); - } - next(); - }); - appRouter.post(UrlUtils.UrlUtils.getPathFromUrl(this.webAppAuthConfig.auth.redirectUri), redirectHandler.call(this)); - if (this.webAppAuthConfig.auth.frontChannelLogoutUri) { - /** - * Expose front-channel logout route. For more information, visit: - * https://docs.microsoft.com/azure/active-directory/develop/v2-protocols-oidc#single-sign-out - */ - appRouter.get(UrlUtils.UrlUtils.getPathFromUrl(this.webAppAuthConfig.auth.frontChannelLogoutUri), (req, res, next) => { - if (req.authContext.isAuthenticated()) { - return req.authContext.logout({ - postLogoutRedirectUri: "/", - idpLogout: false - })(req, res, next); - } - return res.status(401).send("Unauthorized"); - }); - } - if (options.protectAllRoutes) { - appRouter.use((req, res, next) => { - if (!req.authContext.isAuthenticated()) { - return req.authContext.login({ - postLoginRedirectUri: req.originalUrl, - scopes: [], - })(req, res, next); - } - return next(); - }); - } - if (options.acquireTokenForResources) { - const resources = Object.entries(options.acquireTokenForResources); - for (const resource of resources) { - const [resourceName, resourceParams] = resource; - resourceParams.routes.forEach((route) => { - appRouter.use(route, (req, res, next) => { - if (req.authContext.getCachedTokenForResource(resourceName)) { - this.getLogger().verbose("Cached token found for resource endpoint"); - return next(); - } - this.getLogger().verbose("Acquiring token for resource: ", resourceName); - return acquireTokenHandler.call(this, { scopes: resourceParams.scopes }, { resourceName })(req, res, next); - }); - }); - } - } - return appRouter; -} - -module.exports = authenticateMiddleware; -//# sourceMappingURL=authenticateMiddleware.js.map diff --git a/Common/msal-node-wrapper/dist/middleware/authenticateMiddleware.js.map b/Common/msal-node-wrapper/dist/middleware/authenticateMiddleware.js.map deleted file mode 100644 index 26e1756..0000000 --- a/Common/msal-node-wrapper/dist/middleware/authenticateMiddleware.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"authenticateMiddleware.js","sources":["../../src/middleware/authenticateMiddleware.ts"],"sourcesContent":[null],"names":["Router","ErrorMessages","AuthContext","UrlUtils"],"mappings":";;;;;;;;;;;AAAA;;;AAGG;AAWH,SAAS,sBAAsB,CAE3B,OAAsC,EAAA;AAEtC,IAAA,MAAM,SAAS,GAAGA,cAAM,EAAE,CAAC;;IAG3B,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,KAAI;AAC7B,QAAA,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE;AACd,YAAA,MAAM,IAAI,KAAK,CAACC,uBAAa,CAAC,iBAAiB,CAAC,CAAC;AACpD,SAAA;AAED,QAAA,IAAI,CAAC,GAAG,CAAC,WAAW,EAAE;AAClB,YAAA,GAAG,CAAC,WAAW,GAAG,IAAIC,uBAAW,CAAC,IAAI,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC;AAC/D,SAAA;AAED,QAAA,IAAI,EAAE,CAAC;AACX,KAAC,CAAC,CAAC;IAEH,SAAS,CAAC,IAAI,CAACC,iBAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AAE5G,IAAA,IAAI,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,qBAAqB,EAAE;AAClD;;;AAGG;QACH,SAAS,CAAC,GAAG,CACTA,iBAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,qBAAqB,CAAC,EACzE,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,KAAI;AACf,YAAA,IAAI,GAAG,CAAC,WAAW,CAAC,eAAe,EAAE,EAAE;AACnC,gBAAA,OAAO,GAAG,CAAC,WAAW,CAAC,MAAM,CAAC;AAC1B,oBAAA,qBAAqB,EAAE,GAAG;AAC1B,oBAAA,SAAS,EAAE,KAAK;AACnB,iBAAA,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;AACtB,aAAA;YAED,OAAO,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;AAChD,SAAC,CAAC,CAAC;AACV,KAAA;IAED,IAAI,OAAO,CAAC,gBAAgB,EAAE;QAC1B,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,KAAI;AAC7B,YAAA,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,eAAe,EAAE,EAAE;AACpC,gBAAA,OAAO,GAAG,CAAC,WAAW,CAAC,KAAK,CAAC;oBACzB,oBAAoB,EAAE,GAAG,CAAC,WAAW;AACrC,oBAAA,MAAM,EAAE,EAAE;AACb,iBAAA,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;AACtB,aAAA;YAED,OAAO,IAAI,EAAE,CAAC;AAClB,SAAC,CAAC,CAAC;AACN,KAAA;IAED,IAAI,OAAO,CAAC,wBAAwB,EAAE;QAClC,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,wBAAwB,CAAC,CAAC;AAEnE,QAAA,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE;AAC9B,YAAA,MAAM,CAAC,YAAY,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC;YAEhD,cAAc,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,KAAK,KAAI;AACpC,gBAAA,SAAS,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,KAAI;oBACpC,IAAI,GAAG,CAAC,WAAW,CAAC,yBAAyB,CAAC,YAAY,CAAC,EAAE;wBACzD,IAAI,CAAC,SAAS,EAAE,CAAC,OAAO,CAAC,0CAA0C,CAAC,CAAC;wBACrE,OAAO,IAAI,EAAE,CAAC;AACjB,qBAAA;oBAED,IAAI,CAAC,SAAS,EAAE,CAAC,OAAO,CAAC,gCAAgC,EAAE,YAAY,CAAC,CAAC;oBACzE,OAAO,mBAAmB,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,cAAc,CAAC,MAAM,EAAE,EAAE,EAAE,YAAY,EAAE,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;AAC/G,iBAAC,CAAC,CAAC;AACP,aAAC,CAAC,CAAC;AACN,SAAA;AACJ,KAAA;AAED,IAAA,OAAO,SAAS,CAAC;AACrB;;;;"} \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/middleware/context/AuthContext.d.ts b/Common/msal-node-wrapper/dist/middleware/context/AuthContext.d.ts deleted file mode 100644 index 16ae00e..0000000 --- a/Common/msal-node-wrapper/dist/middleware/context/AuthContext.d.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { Request, Response, NextFunction, RequestHandler } from "express"; -import { AccountInfo } from "@azure/msal-node"; -import { WebAppAuthProvider } from "../../provider/WebAppAuthProvider"; -import { LoginOptions, LogoutOptions, TokenRequestOptions } from "../MiddlewareOptions"; -type RequestContext = { - req: Request; - res: Response; - next: NextFunction; -}; -export declare class AuthContext { - private provider; - private context; - constructor(provider: WebAppAuthProvider, context: RequestContext); - /** - * Initiates a login flow with given options - * @param {LoginOptions} options: options to modify the login request - * @returns {RequestHandler} - */ - login(options?: LoginOptions): RequestHandler; - /** - * Initiates a logout flow and destroys the current session - * @param {LogoutOptions} options: options to modify logout request - * @returns {RequestHandler} - */ - logout(options?: LogoutOptions): RequestHandler; - /** - * Acquires an access token for given request parameters - * @param {TokenRequestOptions} options: options to modify token request - * @returns {RequestHandler} - */ - acquireToken(options?: TokenRequestOptions): RequestHandler; - /** - * Returns the current user account from session - * @returns {AccountInfo} account object - */ - getAccount(): AccountInfo | undefined; - /** - * Returns true if session contains user account - * @returns {boolean} authentication status - */ - isAuthenticated(): boolean; - /** - * Returns the cached token for a given resource - * @param {string} resourceName: name of the resource to retrieve token for - * @returns {string | null} cached access token - */ - getCachedTokenForResource(resourceName: string): string | null; -} -export {}; -//# sourceMappingURL=AuthContext.d.ts.map \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/middleware/context/AuthContext.d.ts.map b/Common/msal-node-wrapper/dist/middleware/context/AuthContext.d.ts.map deleted file mode 100644 index fbe71ee..0000000 --- a/Common/msal-node-wrapper/dist/middleware/context/AuthContext.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AuthContext.d.ts","sourceRoot":"","sources":["../../../src/middleware/context/AuthContext.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE1E,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAKxF,KAAK,cAAc,GAAG;IAAE,GAAG,EAAE,OAAO,CAAC;IAAC,GAAG,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,YAAY,CAAA;CAAE,CAAC;AAE1E,qBAAa,WAAW;IACpB,OAAO,CAAC,QAAQ,CAAqB;IACrC,OAAO,CAAC,OAAO,CAAiB;gBAEpB,QAAQ,EAAE,kBAAkB,EAAE,OAAO,EAAE,cAAc;IAKjE;;;;OAIG;IACH,KAAK,CACD,OAAO,GAAE,YAIR,GACF,cAAc;IAIjB;;;;OAIG;IACH,MAAM,CACF,OAAO,GAAE,aAGR,GACF,cAAc;IAIjB;;;;OAIG;IACH,YAAY,CAAC,OAAO,GAAE,mBAErB,GAAG,cAAc;IAIlB;;;OAGG;IACH,UAAU,IAAI,WAAW,GAAG,SAAS;IAIrC;;;OAGG;IACH,eAAe,IAAI,OAAO;IAI1B;;;;OAIG;IACH,yBAAyB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;CAuBjE"} \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/middleware/context/AuthContext.esm.js b/Common/msal-node-wrapper/dist/middleware/context/AuthContext.esm.js deleted file mode 100644 index 6e0af5e..0000000 --- a/Common/msal-node-wrapper/dist/middleware/context/AuthContext.esm.js +++ /dev/null @@ -1,85 +0,0 @@ -/*! msal-node-wrapper v1.0.0-beta 2023-06-25 */ -'use strict'; -import loginHandler from '../handlers/loginHandler.esm.js'; -import logoutHandler from '../handlers/logoutHandler.esm.js'; -import acquireTokenHandler from '../handlers/acquireTokenHandler.esm.js'; -import { TimeUtils } from '../../node_modules/@azure/msal-common/dist/utils/TimeUtils.esm.js'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -class AuthContext { - constructor(provider, context) { - this.provider = provider; - this.context = context; - } - /** - * Initiates a login flow with given options - * @param {LoginOptions} options: options to modify the login request - * @returns {RequestHandler} - */ - login(options = { - postLoginRedirectUri: "/", - postFailureRedirectUri: "/", - scopes: [], - }) { - return loginHandler.call(this.provider, options); - } - /** - * Initiates a logout flow and destroys the current session - * @param {LogoutOptions} options: options to modify logout request - * @returns {RequestHandler} - */ - logout(options = { - postLogoutRedirectUri: "/", - idpLogout: true - }) { - return logoutHandler.call(this.provider, options); - } - /** - * Acquires an access token for given request parameters - * @param {TokenRequestOptions} options: options to modify token request - * @returns {RequestHandler} - */ - acquireToken(options = { - scopes: [], - }) { - return acquireTokenHandler.call(this.provider, options); - } - /** - * Returns the current user account from session - * @returns {AccountInfo} account object - */ - getAccount() { - return this.context.req.session.account || undefined; // eslint-disable-line @typescript-eslint/no-non-null-assertion - } - /** - * Returns true if session contains user account - * @returns {boolean} authentication status - */ - isAuthenticated() { - return !!this.getAccount(); - } - /** - * Returns the cached token for a given resource - * @param {string} resourceName: name of the resource to retrieve token for - * @returns {string | null} cached access token - */ - getCachedTokenForResource(resourceName) { - if (this.context.req.session.protectedResources && this.context.req.session.protectedResources[resourceName]) { - const expiresOn = new Date(this.context.req.session.protectedResources[resourceName].expiresOn); - if (!expiresOn) { - return null; - } - const isTokenExpired = TimeUtils.isTokenExpired(Math.floor(expiresOn.getTime() / 1000).toString(), 300); - if (!isTokenExpired) { - return this.context.req.session.protectedResources[resourceName].accessToken; - } - } - return null; - } -} - -export { AuthContext }; -//# sourceMappingURL=AuthContext.esm.js.map diff --git a/Common/msal-node-wrapper/dist/middleware/context/AuthContext.esm.js.map b/Common/msal-node-wrapper/dist/middleware/context/AuthContext.esm.js.map deleted file mode 100644 index 5c8b193..0000000 --- a/Common/msal-node-wrapper/dist/middleware/context/AuthContext.esm.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AuthContext.esm.js","sources":["../../../src/middleware/context/AuthContext.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;AAAA;;;AAGG;MAaU,WAAW,CAAA;IAIpB,WAAY,CAAA,QAA4B,EAAE,OAAuB,EAAA;AAC7D,QAAA,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;AACzB,QAAA,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;KAC1B;AAED;;;;AAIG;AACH,IAAA,KAAK,CACD,OAAwB,GAAA;AACpB,QAAA,oBAAoB,EAAE,GAAG;AACzB,QAAA,sBAAsB,EAAE,GAAG;AAC3B,QAAA,MAAM,EAAE,EAAE;AACb,KAAA,EAAA;QAED,OAAO,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;KACpD;AAED;;;;AAIG;AACH,IAAA,MAAM,CACF,OAAyB,GAAA;AACrB,QAAA,qBAAqB,EAAE,GAAG;AAC1B,QAAA,SAAS,EAAE,IAAI;AAClB,KAAA,EAAA;QAED,OAAO,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;KACrD;AAED;;;;AAIG;AACH,IAAA,YAAY,CAAC,OAA+B,GAAA;AACxC,QAAA,MAAM,EAAE,EAAE;AACb,KAAA,EAAA;QACG,OAAO,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;KAC3D;AAED;;;AAGG;IACH,UAAU,GAAA;AACN,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,IAAI,SAAS,CAAC;KACxD;AAED;;;AAGG;IACH,eAAe,GAAA;AACX,QAAA,OAAO,CAAC,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC;KAC9B;AAED;;;;AAIG;AACH,IAAA,yBAAyB,CAAC,YAAoB,EAAA;QAC1C,IAAI,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,kBAAkB,IAAI,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,kBAAkB,CAAC,YAAY,CAAC,EAAE;YAE1G,MAAM,SAAS,GAAG,IAAI,IAAI,CACtB,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,kBAAkB,CAAC,YAAY,CAAC,CAAC,SAA8B,CAC3F,CAAC;YAEF,IAAI,CAAC,SAAS,EAAE;AACZ,gBAAA,OAAO,IAAI,CAAC;AACf,aAAA;YAED,MAAM,cAAc,GAAG,SAAS,CAAC,cAAc,CAC3C,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC,QAAQ,EAAE,EACjD,GAAG,CACN,CAAC;YAEF,IAAI,CAAC,cAAc,EAAE;AACjB,gBAAA,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,kBAAkB,CAAC,YAAY,CAAC,CAAC,WAAW,CAAC;AAChF,aAAA;AACJ,SAAA;AAED,QAAA,OAAO,IAAI,CAAC;KACf;AACJ;;;;"} \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/middleware/context/AuthContext.js b/Common/msal-node-wrapper/dist/middleware/context/AuthContext.js deleted file mode 100644 index b63bd59..0000000 --- a/Common/msal-node-wrapper/dist/middleware/context/AuthContext.js +++ /dev/null @@ -1,87 +0,0 @@ -/*! msal-node-wrapper v1.0.0-beta 2023-06-25 */ -'use strict'; -'use strict'; - -var loginHandler = require('../handlers/loginHandler.js'); -var logoutHandler = require('../handlers/logoutHandler.js'); -var acquireTokenHandler = require('../handlers/acquireTokenHandler.js'); -var TimeUtils = require('../../node_modules/@azure/msal-common/dist/utils/TimeUtils.js'); - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -class AuthContext { - constructor(provider, context) { - this.provider = provider; - this.context = context; - } - /** - * Initiates a login flow with given options - * @param {LoginOptions} options: options to modify the login request - * @returns {RequestHandler} - */ - login(options = { - postLoginRedirectUri: "/", - postFailureRedirectUri: "/", - scopes: [], - }) { - return loginHandler.call(this.provider, options); - } - /** - * Initiates a logout flow and destroys the current session - * @param {LogoutOptions} options: options to modify logout request - * @returns {RequestHandler} - */ - logout(options = { - postLogoutRedirectUri: "/", - idpLogout: true - }) { - return logoutHandler.call(this.provider, options); - } - /** - * Acquires an access token for given request parameters - * @param {TokenRequestOptions} options: options to modify token request - * @returns {RequestHandler} - */ - acquireToken(options = { - scopes: [], - }) { - return acquireTokenHandler.call(this.provider, options); - } - /** - * Returns the current user account from session - * @returns {AccountInfo} account object - */ - getAccount() { - return this.context.req.session.account || undefined; // eslint-disable-line @typescript-eslint/no-non-null-assertion - } - /** - * Returns true if session contains user account - * @returns {boolean} authentication status - */ - isAuthenticated() { - return !!this.getAccount(); - } - /** - * Returns the cached token for a given resource - * @param {string} resourceName: name of the resource to retrieve token for - * @returns {string | null} cached access token - */ - getCachedTokenForResource(resourceName) { - if (this.context.req.session.protectedResources && this.context.req.session.protectedResources[resourceName]) { - const expiresOn = new Date(this.context.req.session.protectedResources[resourceName].expiresOn); - if (!expiresOn) { - return null; - } - const isTokenExpired = TimeUtils.TimeUtils.isTokenExpired(Math.floor(expiresOn.getTime() / 1000).toString(), 300); - if (!isTokenExpired) { - return this.context.req.session.protectedResources[resourceName].accessToken; - } - } - return null; - } -} - -exports.AuthContext = AuthContext; -//# sourceMappingURL=AuthContext.js.map diff --git a/Common/msal-node-wrapper/dist/middleware/context/AuthContext.js.map b/Common/msal-node-wrapper/dist/middleware/context/AuthContext.js.map deleted file mode 100644 index 6e635e8..0000000 --- a/Common/msal-node-wrapper/dist/middleware/context/AuthContext.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AuthContext.js","sources":["../../../src/middleware/context/AuthContext.ts"],"sourcesContent":[null],"names":["TimeUtils"],"mappings":";;;;;;;;;AAAA;;;AAGG;MAaU,WAAW,CAAA;IAIpB,WAAY,CAAA,QAA4B,EAAE,OAAuB,EAAA;AAC7D,QAAA,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;AACzB,QAAA,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;KAC1B;AAED;;;;AAIG;AACH,IAAA,KAAK,CACD,OAAwB,GAAA;AACpB,QAAA,oBAAoB,EAAE,GAAG;AACzB,QAAA,sBAAsB,EAAE,GAAG;AAC3B,QAAA,MAAM,EAAE,EAAE;AACb,KAAA,EAAA;QAED,OAAO,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;KACpD;AAED;;;;AAIG;AACH,IAAA,MAAM,CACF,OAAyB,GAAA;AACrB,QAAA,qBAAqB,EAAE,GAAG;AAC1B,QAAA,SAAS,EAAE,IAAI;AAClB,KAAA,EAAA;QAED,OAAO,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;KACrD;AAED;;;;AAIG;AACH,IAAA,YAAY,CAAC,OAA+B,GAAA;AACxC,QAAA,MAAM,EAAE,EAAE;AACb,KAAA,EAAA;QACG,OAAO,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;KAC3D;AAED;;;AAGG;IACH,UAAU,GAAA;AACN,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,IAAI,SAAS,CAAC;KACxD;AAED;;;AAGG;IACH,eAAe,GAAA;AACX,QAAA,OAAO,CAAC,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC;KAC9B;AAED;;;;AAIG;AACH,IAAA,yBAAyB,CAAC,YAAoB,EAAA;QAC1C,IAAI,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,kBAAkB,IAAI,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,kBAAkB,CAAC,YAAY,CAAC,EAAE;YAE1G,MAAM,SAAS,GAAG,IAAI,IAAI,CACtB,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,kBAAkB,CAAC,YAAY,CAAC,CAAC,SAA8B,CAC3F,CAAC;YAEF,IAAI,CAAC,SAAS,EAAE;AACZ,gBAAA,OAAO,IAAI,CAAC;AACf,aAAA;YAED,MAAM,cAAc,GAAGA,mBAAS,CAAC,cAAc,CAC3C,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC,QAAQ,EAAE,EACjD,GAAG,CACN,CAAC;YAEF,IAAI,CAAC,cAAc,EAAE;AACjB,gBAAA,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,kBAAkB,CAAC,YAAY,CAAC,CAAC,WAAW,CAAC;AAChF,aAAA;AACJ,SAAA;AAED,QAAA,OAAO,IAAI,CAAC;KACf;AACJ;;;;"} \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/middleware/errorMiddleware.d.ts b/Common/msal-node-wrapper/dist/middleware/errorMiddleware.d.ts deleted file mode 100644 index 1052ac8..0000000 --- a/Common/msal-node-wrapper/dist/middleware/errorMiddleware.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { ErrorRequestHandler } from "express"; -import { WebAppAuthProvider } from "../provider/WebAppAuthProvider"; -declare function errorMiddleware(this: WebAppAuthProvider): ErrorRequestHandler; -export default errorMiddleware; -//# sourceMappingURL=errorMiddleware.d.ts.map \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/middleware/errorMiddleware.d.ts.map b/Common/msal-node-wrapper/dist/middleware/errorMiddleware.d.ts.map deleted file mode 100644 index 8981b9f..0000000 --- a/Common/msal-node-wrapper/dist/middleware/errorMiddleware.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"errorMiddleware.d.ts","sourceRoot":"","sources":["../../src/middleware/errorMiddleware.ts"],"names":[],"mappings":"AAKA,OAAO,EAAmC,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAC/E,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAGpE,iBAAS,eAAe,CAAC,IAAI,EAAE,kBAAkB,GAAG,mBAAmB,CAWtE;AAED,eAAe,eAAe,CAAC"} \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/middleware/errorMiddleware.esm.js b/Common/msal-node-wrapper/dist/middleware/errorMiddleware.esm.js deleted file mode 100644 index 2a3107e..0000000 --- a/Common/msal-node-wrapper/dist/middleware/errorMiddleware.esm.js +++ /dev/null @@ -1,22 +0,0 @@ -/*! msal-node-wrapper v1.0.0-beta 2023-06-25 */ -'use strict'; -import { InteractionRequiredError } from '../error/InteractionRequiredError.esm.js'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -function errorMiddleware() { - return (err, req, res, next) => { - if (err instanceof InteractionRequiredError) { - return req.authContext.login({ - postLoginRedirectUri: err.requestOptions.postLoginRedirectUri || req.originalUrl, - ...err.requestOptions - })(req, res, next); - } - next(err); - }; -} - -export { errorMiddleware as default }; -//# sourceMappingURL=errorMiddleware.esm.js.map diff --git a/Common/msal-node-wrapper/dist/middleware/errorMiddleware.esm.js.map b/Common/msal-node-wrapper/dist/middleware/errorMiddleware.esm.js.map deleted file mode 100644 index 1b0c5f4..0000000 --- a/Common/msal-node-wrapper/dist/middleware/errorMiddleware.esm.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"errorMiddleware.esm.js","sources":["../../src/middleware/errorMiddleware.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAAA;;;AAGG;AAMH,SAAS,eAAe,GAAA;IACpB,OAAO,CAAC,GAAY,EAAE,GAAY,EAAE,GAAa,EAAE,IAAkB,KAAqB;QACtF,IAAI,GAAG,YAAY,wBAAwB,EAAE;AACzC,YAAA,OAAO,GAAG,CAAC,WAAW,CAAC,KAAK,CAAC;gBACzB,oBAAoB,EAAE,GAAG,CAAC,cAAc,CAAC,oBAAoB,IAAI,GAAG,CAAC,WAAW;gBAChF,GAAG,GAAG,CAAC,cAAc;AACxB,aAAA,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;AACtB,SAAA;QAED,IAAI,CAAC,GAAG,CAAC,CAAC;AACd,KAAC,CAAC;AACN;;;;"} \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/middleware/errorMiddleware.js b/Common/msal-node-wrapper/dist/middleware/errorMiddleware.js deleted file mode 100644 index d88906f..0000000 --- a/Common/msal-node-wrapper/dist/middleware/errorMiddleware.js +++ /dev/null @@ -1,24 +0,0 @@ -/*! msal-node-wrapper v1.0.0-beta 2023-06-25 */ -'use strict'; -'use strict'; - -var InteractionRequiredError = require('../error/InteractionRequiredError.js'); - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -function errorMiddleware() { - return (err, req, res, next) => { - if (err instanceof InteractionRequiredError.InteractionRequiredError) { - return req.authContext.login({ - postLoginRedirectUri: err.requestOptions.postLoginRedirectUri || req.originalUrl, - ...err.requestOptions - })(req, res, next); - } - next(err); - }; -} - -module.exports = errorMiddleware; -//# sourceMappingURL=errorMiddleware.js.map diff --git a/Common/msal-node-wrapper/dist/middleware/errorMiddleware.js.map b/Common/msal-node-wrapper/dist/middleware/errorMiddleware.js.map deleted file mode 100644 index c49782e..0000000 --- a/Common/msal-node-wrapper/dist/middleware/errorMiddleware.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"errorMiddleware.js","sources":["../../src/middleware/errorMiddleware.ts"],"sourcesContent":[null],"names":["InteractionRequiredError"],"mappings":";;;;;;AAAA;;;AAGG;AAMH,SAAS,eAAe,GAAA;IACpB,OAAO,CAAC,GAAY,EAAE,GAAY,EAAE,GAAa,EAAE,IAAkB,KAAqB;QACtF,IAAI,GAAG,YAAYA,iDAAwB,EAAE;AACzC,YAAA,OAAO,GAAG,CAAC,WAAW,CAAC,KAAK,CAAC;gBACzB,oBAAoB,EAAE,GAAG,CAAC,cAAc,CAAC,oBAAoB,IAAI,GAAG,CAAC,WAAW;gBAChF,GAAG,GAAG,CAAC,cAAc;AACxB,aAAA,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;AACtB,SAAA;QAED,IAAI,CAAC,GAAG,CAAC,CAAC;AACd,KAAC,CAAC;AACN;;;;"} \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/middleware/guardMiddleware.d.ts b/Common/msal-node-wrapper/dist/middleware/guardMiddleware.d.ts deleted file mode 100644 index 00fca4c..0000000 --- a/Common/msal-node-wrapper/dist/middleware/guardMiddleware.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { RequestHandler } from "express"; -import { WebAppAuthProvider } from "../provider/WebAppAuthProvider"; -import { RouteGuardOptions } from "./MiddlewareOptions"; -declare function guardMiddleware(this: WebAppAuthProvider, options: RouteGuardOptions): RequestHandler; -export default guardMiddleware; -//# sourceMappingURL=guardMiddleware.d.ts.map \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/middleware/guardMiddleware.d.ts.map b/Common/msal-node-wrapper/dist/middleware/guardMiddleware.d.ts.map deleted file mode 100644 index 656e0cb..0000000 --- a/Common/msal-node-wrapper/dist/middleware/guardMiddleware.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"guardMiddleware.d.ts","sourceRoot":"","sources":["../../src/middleware/guardMiddleware.ts"],"names":[],"mappings":"AAKA,OAAO,EAAmC,cAAc,EAAE,MAAM,SAAS,CAAC;AAC1E,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAGxD,iBAAS,eAAe,CACpB,IAAI,EAAE,kBAAkB,EACxB,OAAO,EAAE,iBAAiB,GAC3B,cAAc,CAiDhB;AAED,eAAe,eAAe,CAAC"} \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/middleware/guardMiddleware.esm.js b/Common/msal-node-wrapper/dist/middleware/guardMiddleware.esm.js deleted file mode 100644 index 349830d..0000000 --- a/Common/msal-node-wrapper/dist/middleware/guardMiddleware.esm.js +++ /dev/null @@ -1,48 +0,0 @@ -/*! msal-node-wrapper v1.0.0-beta 2023-06-25 */ -'use strict'; -import { AccessDeniedError } from '../error/AccessDeniedError.esm.js'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -function guardMiddleware(options) { - return (req, res, next) => { - if (!req.authContext.isAuthenticated()) { - if (options.forceLogin) { - return req.authContext.login({ - postLoginRedirectUri: req.originalUrl, - scopes: [], - })(req, res, next); - } - return next(AccessDeniedError.createUnauthorizedAccessError(req.originalUrl, req.authContext.getAccount())); - } - if (options.idTokenClaims) { - const tokenClaims = req.authContext.getAccount()?.idTokenClaims || {}; - const requiredClaims = options.idTokenClaims; - const hasClaims = Object.keys(requiredClaims).every((claim) => { - if (requiredClaims[claim] && tokenClaims[claim]) { - switch (typeof requiredClaims[claim]) { - case "string" : - return requiredClaims[claim] === tokenClaims[claim]; - case "object": - if (Array.isArray(requiredClaims[claim])) { - const requiredClaimsArray = requiredClaims[claim]; - const tokenClaimsArray = tokenClaims[claim]; - return requiredClaimsArray.some((requiredClaim) => tokenClaimsArray.indexOf(requiredClaim) >= 0); - } - break; - } - } - return false; - }); - if (!hasClaims) { - return next(AccessDeniedError.createForbiddenAccessError(req.originalUrl, req.authContext.getAccount())); - } - } - next(); - }; -} - -export { guardMiddleware as default }; -//# sourceMappingURL=guardMiddleware.esm.js.map diff --git a/Common/msal-node-wrapper/dist/middleware/guardMiddleware.esm.js.map b/Common/msal-node-wrapper/dist/middleware/guardMiddleware.esm.js.map deleted file mode 100644 index e00aeba..0000000 --- a/Common/msal-node-wrapper/dist/middleware/guardMiddleware.esm.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"guardMiddleware.esm.js","sources":["../../src/middleware/guardMiddleware.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAAA;;;AAGG;AAOH,SAAS,eAAe,CAEpB,OAA0B,EAAA;AAE1B,IAAA,OAAO,CAAC,GAAY,EAAE,GAAa,EAAE,IAAkB,KAAqB;AACxE,QAAA,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,eAAe,EAAE,EAAE;YACpC,IAAI,OAAO,CAAC,UAAU,EAAE;AACpB,gBAAA,OAAO,GAAG,CAAC,WAAW,CAAC,KAAK,CAAC;oBACzB,oBAAoB,EAAE,GAAG,CAAC,WAAW;AACrC,oBAAA,MAAM,EAAE,EAAE;AACb,iBAAA,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;AACtB,aAAA;AAED,YAAA,OAAO,IAAI,CAAC,iBAAiB,CAAC,6BAA6B,CAAC,GAAG,CAAC,WAAW,EAAE,GAAG,CAAC,WAAW,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;AAC/G,SAAA;QAED,IAAI,OAAO,CAAC,aAAa,EAAE;AACvB,YAAA,MAAM,WAAW,GAAG,GAAG,CAAC,WAAW,CAAC,UAAU,EAAE,EAAE,aAAa,IAAI,EAAE,CAAC;AACtE,YAAA,MAAM,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;AAE7C,YAAA,MAAM,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,KAAK,CAAC,CAAC,KAAa,KAAI;gBAClE,IAAI,cAAc,CAAC,KAAK,CAAC,IAAI,WAAW,CAAC,KAAK,CAAC,EAAE;AAC7C,oBAAA,QAAQ,OAAO,cAAc,CAAC,KAAK,CAAC;wBAChC,KAAK,QAAQ,CAAY;4BACrB,OAAO,cAAc,CAAC,KAAK,CAAC,KAAK,WAAW,CAAC,KAAK,CAAC,CAAC;AAExD,wBAAA,KAAK,QAAQ;4BACT,IAAI,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,EAAE;AACtC,gCAAA,MAAM,mBAAmB,GAAG,cAAc,CAAC,KAAK,CAAO,CAAC;AACxD,gCAAA,MAAM,gBAAgB,GAAG,WAAW,CAAC,KAAK,CAAO,CAAC;AAElD,gCAAA,OAAO,mBAAmB,CAAC,IAAI,CAC3B,CAAC,aAAa,KAAK,gBAAgB,CAAC,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,CAClE,CAAC;AACL,6BAAA;4BACD,MAAM;AAIb,qBAAA;AACJ,iBAAA;AAED,gBAAA,OAAO,KAAK,CAAC;AACjB,aAAC,CAAC,CAAC;YAEH,IAAI,CAAC,SAAS,EAAE;AACZ,gBAAA,OAAO,IAAI,CAAC,iBAAiB,CAAC,0BAA0B,CAAC,GAAG,CAAC,WAAW,EAAE,GAAG,CAAC,WAAW,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;AAC5G,aAAA;AACJ,SAAA;AAED,QAAA,IAAI,EAAE,CAAC;AACX,KAAC,CAAC;AACN;;;;"} \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/middleware/guardMiddleware.js b/Common/msal-node-wrapper/dist/middleware/guardMiddleware.js deleted file mode 100644 index af255fc..0000000 --- a/Common/msal-node-wrapper/dist/middleware/guardMiddleware.js +++ /dev/null @@ -1,50 +0,0 @@ -/*! msal-node-wrapper v1.0.0-beta 2023-06-25 */ -'use strict'; -'use strict'; - -var AccessDeniedError = require('../error/AccessDeniedError.js'); - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -function guardMiddleware(options) { - return (req, res, next) => { - if (!req.authContext.isAuthenticated()) { - if (options.forceLogin) { - return req.authContext.login({ - postLoginRedirectUri: req.originalUrl, - scopes: [], - })(req, res, next); - } - return next(AccessDeniedError.AccessDeniedError.createUnauthorizedAccessError(req.originalUrl, req.authContext.getAccount())); - } - if (options.idTokenClaims) { - const tokenClaims = req.authContext.getAccount()?.idTokenClaims || {}; - const requiredClaims = options.idTokenClaims; - const hasClaims = Object.keys(requiredClaims).every((claim) => { - if (requiredClaims[claim] && tokenClaims[claim]) { - switch (typeof requiredClaims[claim]) { - case "string" : - return requiredClaims[claim] === tokenClaims[claim]; - case "object": - if (Array.isArray(requiredClaims[claim])) { - const requiredClaimsArray = requiredClaims[claim]; - const tokenClaimsArray = tokenClaims[claim]; - return requiredClaimsArray.some((requiredClaim) => tokenClaimsArray.indexOf(requiredClaim) >= 0); - } - break; - } - } - return false; - }); - if (!hasClaims) { - return next(AccessDeniedError.AccessDeniedError.createForbiddenAccessError(req.originalUrl, req.authContext.getAccount())); - } - } - next(); - }; -} - -module.exports = guardMiddleware; -//# sourceMappingURL=guardMiddleware.js.map diff --git a/Common/msal-node-wrapper/dist/middleware/guardMiddleware.js.map b/Common/msal-node-wrapper/dist/middleware/guardMiddleware.js.map deleted file mode 100644 index fc63bc6..0000000 --- a/Common/msal-node-wrapper/dist/middleware/guardMiddleware.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"guardMiddleware.js","sources":["../../src/middleware/guardMiddleware.ts"],"sourcesContent":[null],"names":["AccessDeniedError"],"mappings":";;;;;;AAAA;;;AAGG;AAOH,SAAS,eAAe,CAEpB,OAA0B,EAAA;AAE1B,IAAA,OAAO,CAAC,GAAY,EAAE,GAAa,EAAE,IAAkB,KAAqB;AACxE,QAAA,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,eAAe,EAAE,EAAE;YACpC,IAAI,OAAO,CAAC,UAAU,EAAE;AACpB,gBAAA,OAAO,GAAG,CAAC,WAAW,CAAC,KAAK,CAAC;oBACzB,oBAAoB,EAAE,GAAG,CAAC,WAAW;AACrC,oBAAA,MAAM,EAAE,EAAE;AACb,iBAAA,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;AACtB,aAAA;AAED,YAAA,OAAO,IAAI,CAACA,mCAAiB,CAAC,6BAA6B,CAAC,GAAG,CAAC,WAAW,EAAE,GAAG,CAAC,WAAW,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;AAC/G,SAAA;QAED,IAAI,OAAO,CAAC,aAAa,EAAE;AACvB,YAAA,MAAM,WAAW,GAAG,GAAG,CAAC,WAAW,CAAC,UAAU,EAAE,EAAE,aAAa,IAAI,EAAE,CAAC;AACtE,YAAA,MAAM,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;AAE7C,YAAA,MAAM,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,KAAK,CAAC,CAAC,KAAa,KAAI;gBAClE,IAAI,cAAc,CAAC,KAAK,CAAC,IAAI,WAAW,CAAC,KAAK,CAAC,EAAE;AAC7C,oBAAA,QAAQ,OAAO,cAAc,CAAC,KAAK,CAAC;wBAChC,KAAK,QAAQ,CAAY;4BACrB,OAAO,cAAc,CAAC,KAAK,CAAC,KAAK,WAAW,CAAC,KAAK,CAAC,CAAC;AAExD,wBAAA,KAAK,QAAQ;4BACT,IAAI,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,EAAE;AACtC,gCAAA,MAAM,mBAAmB,GAAG,cAAc,CAAC,KAAK,CAAO,CAAC;AACxD,gCAAA,MAAM,gBAAgB,GAAG,WAAW,CAAC,KAAK,CAAO,CAAC;AAElD,gCAAA,OAAO,mBAAmB,CAAC,IAAI,CAC3B,CAAC,aAAa,KAAK,gBAAgB,CAAC,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,CAClE,CAAC;AACL,6BAAA;4BACD,MAAM;AAIb,qBAAA;AACJ,iBAAA;AAED,gBAAA,OAAO,KAAK,CAAC;AACjB,aAAC,CAAC,CAAC;YAEH,IAAI,CAAC,SAAS,EAAE;AACZ,gBAAA,OAAO,IAAI,CAACA,mCAAiB,CAAC,0BAA0B,CAAC,GAAG,CAAC,WAAW,EAAE,GAAG,CAAC,WAAW,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;AAC5G,aAAA;AACJ,SAAA;AAED,QAAA,IAAI,EAAE,CAAC;AACX,KAAC,CAAC;AACN;;;;"} \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/middleware/handlers/acquireTokenHandler.d.ts b/Common/msal-node-wrapper/dist/middleware/handlers/acquireTokenHandler.d.ts deleted file mode 100644 index 713d9a6..0000000 --- a/Common/msal-node-wrapper/dist/middleware/handlers/acquireTokenHandler.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { RequestHandler } from "express"; -import { WebAppAuthProvider } from "../../provider/WebAppAuthProvider"; -import { TokenRequestOptions, TokenRequestMiddlewareOptions } from "../MiddlewareOptions"; -declare function acquireTokenHandler(this: WebAppAuthProvider, options: TokenRequestOptions, useAsMiddlewareOptions?: TokenRequestMiddlewareOptions): RequestHandler; -export default acquireTokenHandler; -//# sourceMappingURL=acquireTokenHandler.d.ts.map \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/middleware/handlers/acquireTokenHandler.d.ts.map b/Common/msal-node-wrapper/dist/middleware/handlers/acquireTokenHandler.d.ts.map deleted file mode 100644 index 6647bc9..0000000 --- a/Common/msal-node-wrapper/dist/middleware/handlers/acquireTokenHandler.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"acquireTokenHandler.d.ts","sourceRoot":"","sources":["../../../src/middleware/handlers/acquireTokenHandler.ts"],"names":[],"mappings":"AAKA,OAAO,EAAmC,cAAc,EAAE,MAAM,SAAS,CAAC;AAE1E,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AAG1F,iBAAS,mBAAmB,CACxB,IAAI,EAAE,kBAAkB,EACxB,OAAO,EAAE,mBAAmB,EAC5B,sBAAsB,CAAC,EAAE,6BAA6B,GACvD,cAAc,CAoEhB;AAED,eAAe,mBAAmB,CAAC"} \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/middleware/handlers/acquireTokenHandler.esm.js b/Common/msal-node-wrapper/dist/middleware/handlers/acquireTokenHandler.esm.js deleted file mode 100644 index 0f7df20..0000000 --- a/Common/msal-node-wrapper/dist/middleware/handlers/acquireTokenHandler.esm.js +++ /dev/null @@ -1,56 +0,0 @@ -/*! msal-node-wrapper v1.0.0-beta 2023-06-25 */ -'use strict'; -import { InteractionRequiredAuthError } from '@azure/msal-node'; -import { InteractionRequiredError } from '../../error/InteractionRequiredError.esm.js'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -function acquireTokenHandler(options, useAsMiddlewareOptions) { - return async (req, _res, next) => { - this.getLogger().trace("acquireTokenHandler called"); - try { - const account = options.account || req.session.account; - if (!account) { - throw new InteractionRequiredError("no_account_found", "No account found either in options or in session", undefined, options); - } - const silentRequest = { - account: account, - scopes: options.scopes, - claims: options.claims, - tokenQueryParameters: options.tokenQueryParameters, - }; - const msalInstance = this.getMsalClient(); - if (req.session.tokenCache) { - msalInstance.getTokenCache().deserialize(req.session.tokenCache); - } - const tokenResponse = await msalInstance.acquireTokenSilent(silentRequest); - req.session.tokenCache = msalInstance.getTokenCache().serialize(); - if (!tokenResponse) { - throw new InteractionRequiredError("null_response", "AcquireTokenSilent return null response", undefined, options); - } - if (useAsMiddlewareOptions) { - if (!req.session.protectedResources) { - req.session.protectedResources = { - [useAsMiddlewareOptions.resourceName]: tokenResponse - }; - } - else { - req.session.protectedResources[useAsMiddlewareOptions.resourceName] = tokenResponse; - } - return next(); - } - return tokenResponse; - } - catch (error) { - if (error instanceof InteractionRequiredAuthError) { - return next(new InteractionRequiredError(error.errorCode, error.errorMessage, error.subError, options)); - } - next(error); - } - }; -} - -export { acquireTokenHandler as default }; -//# sourceMappingURL=acquireTokenHandler.esm.js.map diff --git a/Common/msal-node-wrapper/dist/middleware/handlers/acquireTokenHandler.esm.js.map b/Common/msal-node-wrapper/dist/middleware/handlers/acquireTokenHandler.esm.js.map deleted file mode 100644 index 62b0488..0000000 --- a/Common/msal-node-wrapper/dist/middleware/handlers/acquireTokenHandler.esm.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"acquireTokenHandler.esm.js","sources":["../../../src/middleware/handlers/acquireTokenHandler.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;AAAA;;;AAGG;AAQH,SAAS,mBAAmB,CAExB,OAA4B,EAC5B,sBAAsD,EAAA;IAEtD,OAAO,OAAO,GAAY,EAAE,IAAc,EAAE,IAAkB,KAA0C;QACpG,IAAI,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,4BAA4B,CAAC,CAAC;QAErD,IAAI;YACA,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC;YAEvD,IAAI,CAAC,OAAO,EAAE;gBACV,MAAM,IAAI,wBAAwB,CAC9B,kBAAkB,EAClB,kDAAkD,EAClD,SAAS,EACT,OAAO,CACV,CAAC;AACL,aAAA;AAED,YAAA,MAAM,aAAa,GAAsB;AACrC,gBAAA,OAAO,EAAE,OAAO;gBAChB,MAAM,EAAE,OAAO,CAAC,MAAM;gBACtB,MAAM,EAAE,OAAO,CAAC,MAAM;gBACtB,oBAAoB,EAAE,OAAO,CAAC,oBAAoB;aACrD,CAAC;AAEF,YAAA,MAAM,YAAY,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC;AAE1C,YAAA,IAAI,GAAG,CAAC,OAAO,CAAC,UAAU,EAAE;AACxB,gBAAA,YAAY,CAAC,aAAa,EAAE,CAAC,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;AACpE,aAAA;YAED,MAAM,aAAa,GAAG,MAAM,YAAY,CAAC,kBAAkB,CAAC,aAAa,CAAC,CAAC;AAE3E,YAAA,GAAG,CAAC,OAAO,CAAC,UAAU,GAAG,YAAY,CAAC,aAAa,EAAE,CAAC,SAAS,EAAE,CAAC;YAElE,IAAI,CAAC,aAAa,EAAE;gBAChB,MAAM,IAAI,wBAAwB,CAC9B,eAAe,EACf,yCAAyC,EACzC,SAAS,EACT,OAAO,CACV,CAAC;AACL,aAAA;AAED,YAAA,IAAI,sBAAsB,EAAE;AACxB,gBAAA,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,kBAAkB,EAAE;AACjC,oBAAA,GAAG,CAAC,OAAO,CAAC,kBAAkB,GAAG;AAC7B,wBAAA,CAAC,sBAAsB,CAAC,YAAY,GAAG,aAAa;qBACvD,CAAC;AACL,iBAAA;AAAM,qBAAA;oBACH,GAAG,CAAC,OAAO,CAAC,kBAAkB,CAAC,sBAAsB,CAAC,YAAY,CAAC,GAAG,aAAa,CAAC;AACvF,iBAAA;gBAED,OAAO,IAAI,EAAE,CAAC;AACjB,aAAA;AAED,YAAA,OAAO,aAAa,CAAC;AACxB,SAAA;AAAC,QAAA,OAAO,KAAK,EAAE;YACZ,IAAI,KAAK,YAAY,4BAA4B,EAAE;gBAC/C,OAAO,IAAI,CAAC,IAAI,wBAAwB,CACpC,KAAK,CAAC,SAAS,EACf,KAAK,CAAC,YAAY,EAClB,KAAK,CAAC,QAAQ,EACd,OAAO,CACV,CAAC,CAAC;AACN,aAAA;YAED,IAAI,CAAC,KAAK,CAAC,CAAC;AACf,SAAA;AACL,KAAC,CAAC;AACN;;;;"} \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/middleware/handlers/acquireTokenHandler.js b/Common/msal-node-wrapper/dist/middleware/handlers/acquireTokenHandler.js deleted file mode 100644 index cf9d67f..0000000 --- a/Common/msal-node-wrapper/dist/middleware/handlers/acquireTokenHandler.js +++ /dev/null @@ -1,58 +0,0 @@ -/*! msal-node-wrapper v1.0.0-beta 2023-06-25 */ -'use strict'; -'use strict'; - -var msalNode = require('@azure/msal-node'); -var InteractionRequiredError = require('../../error/InteractionRequiredError.js'); - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -function acquireTokenHandler(options, useAsMiddlewareOptions) { - return async (req, _res, next) => { - this.getLogger().trace("acquireTokenHandler called"); - try { - const account = options.account || req.session.account; - if (!account) { - throw new InteractionRequiredError.InteractionRequiredError("no_account_found", "No account found either in options or in session", undefined, options); - } - const silentRequest = { - account: account, - scopes: options.scopes, - claims: options.claims, - tokenQueryParameters: options.tokenQueryParameters, - }; - const msalInstance = this.getMsalClient(); - if (req.session.tokenCache) { - msalInstance.getTokenCache().deserialize(req.session.tokenCache); - } - const tokenResponse = await msalInstance.acquireTokenSilent(silentRequest); - req.session.tokenCache = msalInstance.getTokenCache().serialize(); - if (!tokenResponse) { - throw new InteractionRequiredError.InteractionRequiredError("null_response", "AcquireTokenSilent return null response", undefined, options); - } - if (useAsMiddlewareOptions) { - if (!req.session.protectedResources) { - req.session.protectedResources = { - [useAsMiddlewareOptions.resourceName]: tokenResponse - }; - } - else { - req.session.protectedResources[useAsMiddlewareOptions.resourceName] = tokenResponse; - } - return next(); - } - return tokenResponse; - } - catch (error) { - if (error instanceof msalNode.InteractionRequiredAuthError) { - return next(new InteractionRequiredError.InteractionRequiredError(error.errorCode, error.errorMessage, error.subError, options)); - } - next(error); - } - }; -} - -module.exports = acquireTokenHandler; -//# sourceMappingURL=acquireTokenHandler.js.map diff --git a/Common/msal-node-wrapper/dist/middleware/handlers/acquireTokenHandler.js.map b/Common/msal-node-wrapper/dist/middleware/handlers/acquireTokenHandler.js.map deleted file mode 100644 index c3ed43e..0000000 --- a/Common/msal-node-wrapper/dist/middleware/handlers/acquireTokenHandler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"acquireTokenHandler.js","sources":["../../../src/middleware/handlers/acquireTokenHandler.ts"],"sourcesContent":[null],"names":["InteractionRequiredError","InteractionRequiredAuthError"],"mappings":";;;;;;;AAAA;;;AAGG;AAQH,SAAS,mBAAmB,CAExB,OAA4B,EAC5B,sBAAsD,EAAA;IAEtD,OAAO,OAAO,GAAY,EAAE,IAAc,EAAE,IAAkB,KAA0C;QACpG,IAAI,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,4BAA4B,CAAC,CAAC;QAErD,IAAI;YACA,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC;YAEvD,IAAI,CAAC,OAAO,EAAE;gBACV,MAAM,IAAIA,iDAAwB,CAC9B,kBAAkB,EAClB,kDAAkD,EAClD,SAAS,EACT,OAAO,CACV,CAAC;AACL,aAAA;AAED,YAAA,MAAM,aAAa,GAAsB;AACrC,gBAAA,OAAO,EAAE,OAAO;gBAChB,MAAM,EAAE,OAAO,CAAC,MAAM;gBACtB,MAAM,EAAE,OAAO,CAAC,MAAM;gBACtB,oBAAoB,EAAE,OAAO,CAAC,oBAAoB;aACrD,CAAC;AAEF,YAAA,MAAM,YAAY,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC;AAE1C,YAAA,IAAI,GAAG,CAAC,OAAO,CAAC,UAAU,EAAE;AACxB,gBAAA,YAAY,CAAC,aAAa,EAAE,CAAC,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;AACpE,aAAA;YAED,MAAM,aAAa,GAAG,MAAM,YAAY,CAAC,kBAAkB,CAAC,aAAa,CAAC,CAAC;AAE3E,YAAA,GAAG,CAAC,OAAO,CAAC,UAAU,GAAG,YAAY,CAAC,aAAa,EAAE,CAAC,SAAS,EAAE,CAAC;YAElE,IAAI,CAAC,aAAa,EAAE;gBAChB,MAAM,IAAIA,iDAAwB,CAC9B,eAAe,EACf,yCAAyC,EACzC,SAAS,EACT,OAAO,CACV,CAAC;AACL,aAAA;AAED,YAAA,IAAI,sBAAsB,EAAE;AACxB,gBAAA,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,kBAAkB,EAAE;AACjC,oBAAA,GAAG,CAAC,OAAO,CAAC,kBAAkB,GAAG;AAC7B,wBAAA,CAAC,sBAAsB,CAAC,YAAY,GAAG,aAAa;qBACvD,CAAC;AACL,iBAAA;AAAM,qBAAA;oBACH,GAAG,CAAC,OAAO,CAAC,kBAAkB,CAAC,sBAAsB,CAAC,YAAY,CAAC,GAAG,aAAa,CAAC;AACvF,iBAAA;gBAED,OAAO,IAAI,EAAE,CAAC;AACjB,aAAA;AAED,YAAA,OAAO,aAAa,CAAC;AACxB,SAAA;AAAC,QAAA,OAAO,KAAK,EAAE;YACZ,IAAI,KAAK,YAAYC,qCAA4B,EAAE;gBAC/C,OAAO,IAAI,CAAC,IAAID,iDAAwB,CACpC,KAAK,CAAC,SAAS,EACf,KAAK,CAAC,YAAY,EAClB,KAAK,CAAC,QAAQ,EACd,OAAO,CACV,CAAC,CAAC;AACN,aAAA;YAED,IAAI,CAAC,KAAK,CAAC,CAAC;AACf,SAAA;AACL,KAAC,CAAC;AACN;;;;"} \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/middleware/handlers/loginHandler.d.ts b/Common/msal-node-wrapper/dist/middleware/handlers/loginHandler.d.ts deleted file mode 100644 index cc50ad8..0000000 --- a/Common/msal-node-wrapper/dist/middleware/handlers/loginHandler.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { RequestHandler } from "express"; -import { WebAppAuthProvider } from "../../provider/WebAppAuthProvider"; -import { LoginOptions } from "../MiddlewareOptions"; -declare function loginHandler(this: WebAppAuthProvider, options: LoginOptions): RequestHandler; -export default loginHandler; -//# sourceMappingURL=loginHandler.d.ts.map \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/middleware/handlers/loginHandler.d.ts.map b/Common/msal-node-wrapper/dist/middleware/handlers/loginHandler.d.ts.map deleted file mode 100644 index 41944fd..0000000 --- a/Common/msal-node-wrapper/dist/middleware/handlers/loginHandler.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"loginHandler.d.ts","sourceRoot":"","sources":["../../../src/middleware/handlers/loginHandler.ts"],"names":[],"mappings":"AAKA,OAAO,EAAmC,cAAc,EAAE,MAAM,SAAS,CAAC;AAG1E,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,YAAY,EAAY,MAAM,sBAAsB,CAAC;AAI9D,iBAAS,YAAY,CACjB,IAAI,EAAE,kBAAkB,EACxB,OAAO,EAAE,YAAY,GACtB,cAAc,CA6ChB;AAED,eAAe,YAAY,CAAC"} \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/middleware/handlers/loginHandler.esm.js b/Common/msal-node-wrapper/dist/middleware/handlers/loginHandler.esm.js deleted file mode 100644 index 3ed3e02..0000000 --- a/Common/msal-node-wrapper/dist/middleware/handlers/loginHandler.esm.js +++ /dev/null @@ -1,52 +0,0 @@ -/*! msal-node-wrapper v1.0.0-beta 2023-06-25 */ -'use strict'; -import { UrlUtils } from '../../utils/UrlUtils.esm.js'; -import { EMPTY_STRING } from '../../utils/Constants.esm.js'; -import { ResponseMode } from '../../node_modules/@azure/msal-common/dist/utils/Constants.esm.js'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -function loginHandler(options) { - return async (req, res, next) => { - this.getLogger().trace("loginHandler called"); - const state = { - redirectTo: options.postLoginRedirectUri || "/", - customState: options.state - }; - const authUrlParams = { - state: this.getCryptoProvider().base64Encode(JSON.stringify(state)), - redirectUri: UrlUtils.ensureAbsoluteUrl(this.webAppAuthConfig.auth.redirectUri, req.protocol, req.get("host") || req.hostname), - responseMode: ResponseMode.FORM_POST, - scopes: options.scopes || [], - prompt: options.prompt || undefined, - claims: options.claims || undefined, - account: options.account || undefined, - sid: options.sid || undefined, - loginHint: options.loginHint || undefined, - domainHint: options.domainHint || undefined, - extraQueryParameters: options.extraQueryParameters || undefined, - extraScopesToConsent: options.extraScopesToConsent || undefined, - }; - req.session.tokenRequestParams = { - scopes: authUrlParams.scopes, - state: authUrlParams.state, - redirectUri: authUrlParams.redirectUri, - claims: authUrlParams.claims, - tokenBodyParameters: options.tokenBodyParameters, - tokenQueryParameters: options.tokenQueryParameters, - code: EMPTY_STRING, - }; - try { - const response = await this.getMsalClient().getAuthCodeUrl(authUrlParams); - res.redirect(response); - } - catch (error) { - next(error); - } - }; -} - -export { loginHandler as default }; -//# sourceMappingURL=loginHandler.esm.js.map diff --git a/Common/msal-node-wrapper/dist/middleware/handlers/loginHandler.esm.js.map b/Common/msal-node-wrapper/dist/middleware/handlers/loginHandler.esm.js.map deleted file mode 100644 index 3eba3ce..0000000 --- a/Common/msal-node-wrapper/dist/middleware/handlers/loginHandler.esm.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"loginHandler.esm.js","sources":["../../../src/middleware/handlers/loginHandler.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;AAAA;;;AAGG;AAUH,SAAS,YAAY,CAEjB,OAAqB,EAAA;IAErB,OAAO,OAAO,GAAY,EAAE,GAAa,EAAE,IAAkB,KAAmB;QAC5E,IAAI,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC;AAE9C,QAAA,MAAM,KAAK,GAAa;AACpB,YAAA,UAAU,EAAE,OAAO,CAAC,oBAAoB,IAAI,GAAG;YAC/C,WAAW,EAAE,OAAO,CAAC,KAAK;SAC7B,CAAC;AAEF,QAAA,MAAM,aAAa,GAA4B;AAC3C,YAAA,KAAK,EAAE,IAAI,CAAC,iBAAiB,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;YACnE,WAAW,EAAE,QAAQ,CAAC,iBAAiB,CACnC,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,WAAW,EACtC,GAAG,CAAC,QAAQ,EACZ,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,GAAG,CAAC,QAAQ,CAClC;YACD,YAAY,EAAE,YAAY,CAAC,SAAS;AACpC,YAAA,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,EAAE;AAC5B,YAAA,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,SAAS;AACnC,YAAA,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,SAAS;AACnC,YAAA,OAAO,EAAE,OAAO,CAAC,OAAO,IAAI,SAAS;AACrC,YAAA,GAAG,EAAE,OAAO,CAAC,GAAG,IAAI,SAAS;AAC7B,YAAA,SAAS,EAAE,OAAO,CAAC,SAAS,IAAI,SAAS;AACzC,YAAA,UAAU,EAAE,OAAO,CAAC,UAAU,IAAI,SAAS;AAC3C,YAAA,oBAAoB,EAAE,OAAO,CAAC,oBAAoB,IAAI,SAAS;AAC/D,YAAA,oBAAoB,EAAE,OAAO,CAAC,oBAAoB,IAAI,SAAS;SAClE,CAAC;AAEF,QAAA,GAAG,CAAC,OAAO,CAAC,kBAAkB,GAAG;YAC7B,MAAM,EAAE,aAAa,CAAC,MAAM;YAC5B,KAAK,EAAE,aAAa,CAAC,KAAK;YAC1B,WAAW,EAAE,aAAa,CAAC,WAAW;YACtC,MAAM,EAAE,aAAa,CAAC,MAAM;YAC5B,mBAAmB,EAAE,OAAO,CAAC,mBAAmB;YAChD,oBAAoB,EAAE,OAAO,CAAC,oBAAoB;AAClD,YAAA,IAAI,EAAE,YAAY;SACO,CAAC;QAE9B,IAAI;AACA,YAAA,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,aAAa,EAAE,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC;AAC1E,YAAA,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AAC1B,SAAA;AAAC,QAAA,OAAO,KAAK,EAAE;YACZ,IAAI,CAAC,KAAK,CAAC,CAAC;AACf,SAAA;AACL,KAAC,CAAC;AACN;;;;"} \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/middleware/handlers/loginHandler.js b/Common/msal-node-wrapper/dist/middleware/handlers/loginHandler.js deleted file mode 100644 index 4baae28..0000000 --- a/Common/msal-node-wrapper/dist/middleware/handlers/loginHandler.js +++ /dev/null @@ -1,54 +0,0 @@ -/*! msal-node-wrapper v1.0.0-beta 2023-06-25 */ -'use strict'; -'use strict'; - -var UrlUtils = require('../../utils/UrlUtils.js'); -var Constants$1 = require('../../utils/Constants.js'); -var Constants = require('../../node_modules/@azure/msal-common/dist/utils/Constants.js'); - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -function loginHandler(options) { - return async (req, res, next) => { - this.getLogger().trace("loginHandler called"); - const state = { - redirectTo: options.postLoginRedirectUri || "/", - customState: options.state - }; - const authUrlParams = { - state: this.getCryptoProvider().base64Encode(JSON.stringify(state)), - redirectUri: UrlUtils.UrlUtils.ensureAbsoluteUrl(this.webAppAuthConfig.auth.redirectUri, req.protocol, req.get("host") || req.hostname), - responseMode: Constants.ResponseMode.FORM_POST, - scopes: options.scopes || [], - prompt: options.prompt || undefined, - claims: options.claims || undefined, - account: options.account || undefined, - sid: options.sid || undefined, - loginHint: options.loginHint || undefined, - domainHint: options.domainHint || undefined, - extraQueryParameters: options.extraQueryParameters || undefined, - extraScopesToConsent: options.extraScopesToConsent || undefined, - }; - req.session.tokenRequestParams = { - scopes: authUrlParams.scopes, - state: authUrlParams.state, - redirectUri: authUrlParams.redirectUri, - claims: authUrlParams.claims, - tokenBodyParameters: options.tokenBodyParameters, - tokenQueryParameters: options.tokenQueryParameters, - code: Constants$1.EMPTY_STRING, - }; - try { - const response = await this.getMsalClient().getAuthCodeUrl(authUrlParams); - res.redirect(response); - } - catch (error) { - next(error); - } - }; -} - -module.exports = loginHandler; -//# sourceMappingURL=loginHandler.js.map diff --git a/Common/msal-node-wrapper/dist/middleware/handlers/loginHandler.js.map b/Common/msal-node-wrapper/dist/middleware/handlers/loginHandler.js.map deleted file mode 100644 index 58ee785..0000000 --- a/Common/msal-node-wrapper/dist/middleware/handlers/loginHandler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"loginHandler.js","sources":["../../../src/middleware/handlers/loginHandler.ts"],"sourcesContent":[null],"names":["UrlUtils","ResponseMode","EMPTY_STRING"],"mappings":";;;;;;;;AAAA;;;AAGG;AAUH,SAAS,YAAY,CAEjB,OAAqB,EAAA;IAErB,OAAO,OAAO,GAAY,EAAE,GAAa,EAAE,IAAkB,KAAmB;QAC5E,IAAI,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC;AAE9C,QAAA,MAAM,KAAK,GAAa;AACpB,YAAA,UAAU,EAAE,OAAO,CAAC,oBAAoB,IAAI,GAAG;YAC/C,WAAW,EAAE,OAAO,CAAC,KAAK;SAC7B,CAAC;AAEF,QAAA,MAAM,aAAa,GAA4B;AAC3C,YAAA,KAAK,EAAE,IAAI,CAAC,iBAAiB,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;YACnE,WAAW,EAAEA,iBAAQ,CAAC,iBAAiB,CACnC,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,WAAW,EACtC,GAAG,CAAC,QAAQ,EACZ,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,GAAG,CAAC,QAAQ,CAClC;YACD,YAAY,EAAEC,sBAAY,CAAC,SAAS;AACpC,YAAA,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,EAAE;AAC5B,YAAA,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,SAAS;AACnC,YAAA,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,SAAS;AACnC,YAAA,OAAO,EAAE,OAAO,CAAC,OAAO,IAAI,SAAS;AACrC,YAAA,GAAG,EAAE,OAAO,CAAC,GAAG,IAAI,SAAS;AAC7B,YAAA,SAAS,EAAE,OAAO,CAAC,SAAS,IAAI,SAAS;AACzC,YAAA,UAAU,EAAE,OAAO,CAAC,UAAU,IAAI,SAAS;AAC3C,YAAA,oBAAoB,EAAE,OAAO,CAAC,oBAAoB,IAAI,SAAS;AAC/D,YAAA,oBAAoB,EAAE,OAAO,CAAC,oBAAoB,IAAI,SAAS;SAClE,CAAC;AAEF,QAAA,GAAG,CAAC,OAAO,CAAC,kBAAkB,GAAG;YAC7B,MAAM,EAAE,aAAa,CAAC,MAAM;YAC5B,KAAK,EAAE,aAAa,CAAC,KAAK;YAC1B,WAAW,EAAE,aAAa,CAAC,WAAW;YACtC,MAAM,EAAE,aAAa,CAAC,MAAM;YAC5B,mBAAmB,EAAE,OAAO,CAAC,mBAAmB;YAChD,oBAAoB,EAAE,OAAO,CAAC,oBAAoB;AAClD,YAAA,IAAI,EAAEC,wBAAY;SACO,CAAC;QAE9B,IAAI;AACA,YAAA,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,aAAa,EAAE,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC;AAC1E,YAAA,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AAC1B,SAAA;AAAC,QAAA,OAAO,KAAK,EAAE;YACZ,IAAI,CAAC,KAAK,CAAC,CAAC;AACf,SAAA;AACL,KAAC,CAAC;AACN;;;;"} \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/middleware/handlers/logoutHandler.d.ts b/Common/msal-node-wrapper/dist/middleware/handlers/logoutHandler.d.ts deleted file mode 100644 index 889b2d9..0000000 --- a/Common/msal-node-wrapper/dist/middleware/handlers/logoutHandler.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { RequestHandler } from "express"; -import { WebAppAuthProvider } from "../../provider/WebAppAuthProvider"; -import { LogoutOptions } from "../MiddlewareOptions"; -declare function logoutHandler(this: WebAppAuthProvider, options: LogoutOptions): RequestHandler; -export default logoutHandler; -//# sourceMappingURL=logoutHandler.d.ts.map \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/middleware/handlers/logoutHandler.d.ts.map b/Common/msal-node-wrapper/dist/middleware/handlers/logoutHandler.d.ts.map deleted file mode 100644 index 67fbbed..0000000 --- a/Common/msal-node-wrapper/dist/middleware/handlers/logoutHandler.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"logoutHandler.d.ts","sourceRoot":"","sources":["../../../src/middleware/handlers/logoutHandler.ts"],"names":[],"mappings":"AAKA,OAAO,EAAqB,cAAc,EAAE,MAAM,SAAS,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAGrD,iBAAS,aAAa,CAClB,IAAI,EAAE,kBAAkB,EACxB,OAAO,EAAE,aAAa,GACvB,cAAc,CA4ChB;AAED,eAAe,aAAa,CAAC"} \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/middleware/handlers/logoutHandler.esm.js b/Common/msal-node-wrapper/dist/middleware/handlers/logoutHandler.esm.js deleted file mode 100644 index bb84730..0000000 --- a/Common/msal-node-wrapper/dist/middleware/handlers/logoutHandler.esm.js +++ /dev/null @@ -1,45 +0,0 @@ -/*! msal-node-wrapper v1.0.0-beta 2023-06-25 */ -'use strict'; -import { UrlUtils } from '../../utils/UrlUtils.esm.js'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -function logoutHandler(options) { - return async (req, res) => { - this.getLogger().trace("logoutHandler called"); - const shouldLogoutFromIdp = options.idpLogout ? options.idpLogout : true; - let logoutUri = options.postLogoutRedirectUri || "/"; - const account = req.authContext.getAccount(); - if (account) { - try { - const tokenCache = this.getMsalClient().getTokenCache(); - const cachedAccount = await tokenCache.getAccountByHomeId(account.homeAccountId); - if (cachedAccount) { - await tokenCache.removeAccount(cachedAccount); - } - } - catch (error) { - this.logger.error(`Error occurred while clearing cache for user: ${JSON.stringify(error)}`); - } - } - if (shouldLogoutFromIdp) { - /** - * Construct a logout URI and redirect the user to end the - * session with Azure AD. For more information, visit: - * (AAD) https://docs.microsoft.com/azure/active-directory/develop/v2-protocols-oidc#send-a-sign-out-request - * (B2C) https://docs.microsoft.com/azure/active-directory-b2c/openid-connect#send-a-sign-out-request - */ - const postLogoutRedirectUri = UrlUtils.ensureAbsoluteUrl(options.postLogoutRedirectUri || "/", req.protocol, req.get("host") || req.hostname); - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - logoutUri = `${UrlUtils.enforceTrailingSlash(this.getMsalConfig().auth.authority)}/oauth2/v2.0/logout?post_logout_redirect_uri=${postLogoutRedirectUri}`; - } - req.session.destroy(() => { - res.redirect(logoutUri); - }); - }; -} - -export { logoutHandler as default }; -//# sourceMappingURL=logoutHandler.esm.js.map diff --git a/Common/msal-node-wrapper/dist/middleware/handlers/logoutHandler.esm.js.map b/Common/msal-node-wrapper/dist/middleware/handlers/logoutHandler.esm.js.map deleted file mode 100644 index e209f0c..0000000 --- a/Common/msal-node-wrapper/dist/middleware/handlers/logoutHandler.esm.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"logoutHandler.esm.js","sources":["../../../src/middleware/handlers/logoutHandler.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAAA;;;AAGG;AAOH,SAAS,aAAa,CAElB,OAAsB,EAAA;AAEtB,IAAA,OAAO,OAAO,GAAY,EAAE,GAAa,KAAmB;QACxD,IAAI,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,sBAAsB,CAAC,CAAC;AAE/C,QAAA,MAAM,mBAAmB,GAAG,OAAO,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC;AACzE,QAAA,IAAI,SAAS,GAAG,OAAO,CAAC,qBAAqB,IAAI,GAAG,CAAC;QAErD,MAAM,OAAO,GAAG,GAAG,CAAC,WAAW,CAAC,UAAU,EAAE,CAAC;AAE7C,QAAA,IAAI,OAAO,EAAE;YACT,IAAI;gBACA,MAAM,UAAU,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC,aAAa,EAAE,CAAC;gBACxD,MAAM,aAAa,GAAG,MAAM,UAAU,CAAC,kBAAkB,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;AAEjF,gBAAA,IAAI,aAAa,EAAE;AACf,oBAAA,MAAM,UAAU,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC;AACjD,iBAAA;AACJ,aAAA;AAAC,YAAA,OAAO,KAAK,EAAE;AACZ,gBAAA,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAiD,8CAAA,EAAA,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAA,CAAE,CAAC,CAAC;AAC/F,aAAA;AACJ,SAAA;AAED,QAAA,IAAI,mBAAmB,EAAE;AACrB;;;;;AAKG;YAEH,MAAM,qBAAqB,GAAG,QAAQ,CAAC,iBAAiB,CACpD,OAAO,CAAC,qBAAqB,IAAI,GAAG,EACpC,GAAG,CAAC,QAAQ,EACZ,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,GAAG,CAAC,QAAQ,CAClC,CAAC;;AAGF,YAAA,SAAS,GAAG,CAAG,EAAA,QAAQ,CAAC,oBAAoB,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC,IAAI,CAAC,SAAU,CAAC,CAAgD,6CAAA,EAAA,qBAAqB,EAAE,CAAC;AAC7J,SAAA;AAED,QAAA,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,MAAK;AACrB,YAAA,GAAG,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;AAC5B,SAAC,CAAC,CAAC;AACP,KAAC,CAAC;AACN;;;;"} \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/middleware/handlers/logoutHandler.js b/Common/msal-node-wrapper/dist/middleware/handlers/logoutHandler.js deleted file mode 100644 index afed7cf..0000000 --- a/Common/msal-node-wrapper/dist/middleware/handlers/logoutHandler.js +++ /dev/null @@ -1,47 +0,0 @@ -/*! msal-node-wrapper v1.0.0-beta 2023-06-25 */ -'use strict'; -'use strict'; - -var UrlUtils = require('../../utils/UrlUtils.js'); - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -function logoutHandler(options) { - return async (req, res) => { - this.getLogger().trace("logoutHandler called"); - const shouldLogoutFromIdp = options.idpLogout ? options.idpLogout : true; - let logoutUri = options.postLogoutRedirectUri || "/"; - const account = req.authContext.getAccount(); - if (account) { - try { - const tokenCache = this.getMsalClient().getTokenCache(); - const cachedAccount = await tokenCache.getAccountByHomeId(account.homeAccountId); - if (cachedAccount) { - await tokenCache.removeAccount(cachedAccount); - } - } - catch (error) { - this.logger.error(`Error occurred while clearing cache for user: ${JSON.stringify(error)}`); - } - } - if (shouldLogoutFromIdp) { - /** - * Construct a logout URI and redirect the user to end the - * session with Azure AD. For more information, visit: - * (AAD) https://docs.microsoft.com/azure/active-directory/develop/v2-protocols-oidc#send-a-sign-out-request - * (B2C) https://docs.microsoft.com/azure/active-directory-b2c/openid-connect#send-a-sign-out-request - */ - const postLogoutRedirectUri = UrlUtils.UrlUtils.ensureAbsoluteUrl(options.postLogoutRedirectUri || "/", req.protocol, req.get("host") || req.hostname); - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - logoutUri = `${UrlUtils.UrlUtils.enforceTrailingSlash(this.getMsalConfig().auth.authority)}/oauth2/v2.0/logout?post_logout_redirect_uri=${postLogoutRedirectUri}`; - } - req.session.destroy(() => { - res.redirect(logoutUri); - }); - }; -} - -module.exports = logoutHandler; -//# sourceMappingURL=logoutHandler.js.map diff --git a/Common/msal-node-wrapper/dist/middleware/handlers/logoutHandler.js.map b/Common/msal-node-wrapper/dist/middleware/handlers/logoutHandler.js.map deleted file mode 100644 index b3c840a..0000000 --- a/Common/msal-node-wrapper/dist/middleware/handlers/logoutHandler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"logoutHandler.js","sources":["../../../src/middleware/handlers/logoutHandler.ts"],"sourcesContent":[null],"names":["UrlUtils"],"mappings":";;;;;;AAAA;;;AAGG;AAOH,SAAS,aAAa,CAElB,OAAsB,EAAA;AAEtB,IAAA,OAAO,OAAO,GAAY,EAAE,GAAa,KAAmB;QACxD,IAAI,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,sBAAsB,CAAC,CAAC;AAE/C,QAAA,MAAM,mBAAmB,GAAG,OAAO,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC;AACzE,QAAA,IAAI,SAAS,GAAG,OAAO,CAAC,qBAAqB,IAAI,GAAG,CAAC;QAErD,MAAM,OAAO,GAAG,GAAG,CAAC,WAAW,CAAC,UAAU,EAAE,CAAC;AAE7C,QAAA,IAAI,OAAO,EAAE;YACT,IAAI;gBACA,MAAM,UAAU,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC,aAAa,EAAE,CAAC;gBACxD,MAAM,aAAa,GAAG,MAAM,UAAU,CAAC,kBAAkB,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;AAEjF,gBAAA,IAAI,aAAa,EAAE;AACf,oBAAA,MAAM,UAAU,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC;AACjD,iBAAA;AACJ,aAAA;AAAC,YAAA,OAAO,KAAK,EAAE;AACZ,gBAAA,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAiD,8CAAA,EAAA,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAA,CAAE,CAAC,CAAC;AAC/F,aAAA;AACJ,SAAA;AAED,QAAA,IAAI,mBAAmB,EAAE;AACrB;;;;;AAKG;YAEH,MAAM,qBAAqB,GAAGA,iBAAQ,CAAC,iBAAiB,CACpD,OAAO,CAAC,qBAAqB,IAAI,GAAG,EACpC,GAAG,CAAC,QAAQ,EACZ,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,GAAG,CAAC,QAAQ,CAClC,CAAC;;AAGF,YAAA,SAAS,GAAG,CAAG,EAAAA,iBAAQ,CAAC,oBAAoB,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC,IAAI,CAAC,SAAU,CAAC,CAAgD,6CAAA,EAAA,qBAAqB,EAAE,CAAC;AAC7J,SAAA;AAED,QAAA,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,MAAK;AACrB,YAAA,GAAG,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;AAC5B,SAAC,CAAC,CAAC;AACP,KAAC,CAAC;AACN;;;;"} \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/middleware/handlers/redirectHandler.d.ts b/Common/msal-node-wrapper/dist/middleware/handlers/redirectHandler.d.ts deleted file mode 100644 index 0e1274d..0000000 --- a/Common/msal-node-wrapper/dist/middleware/handlers/redirectHandler.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { RequestHandler } from "express"; -import { WebAppAuthProvider } from "../../provider/WebAppAuthProvider"; -declare function redirectHandler(this: WebAppAuthProvider): RequestHandler; -export default redirectHandler; -//# sourceMappingURL=redirectHandler.d.ts.map \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/middleware/handlers/redirectHandler.d.ts.map b/Common/msal-node-wrapper/dist/middleware/handlers/redirectHandler.d.ts.map deleted file mode 100644 index 34845f3..0000000 --- a/Common/msal-node-wrapper/dist/middleware/handlers/redirectHandler.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"redirectHandler.d.ts","sourceRoot":"","sources":["../../../src/middleware/handlers/redirectHandler.ts"],"names":[],"mappings":"AAKA,OAAO,EAAmC,cAAc,EAAE,MAAM,SAAS,CAAC;AAG1E,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAIvE,iBAAS,eAAe,CAAC,IAAI,EAAE,kBAAkB,GAAG,cAAc,CA0CjE;AAED,eAAe,eAAe,CAAC"} \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/middleware/handlers/redirectHandler.esm.js b/Common/msal-node-wrapper/dist/middleware/handlers/redirectHandler.esm.js deleted file mode 100644 index de20ad4..0000000 --- a/Common/msal-node-wrapper/dist/middleware/handlers/redirectHandler.esm.js +++ /dev/null @@ -1,43 +0,0 @@ -/*! msal-node-wrapper v1.0.0-beta 2023-06-25 */ -'use strict'; -import { ErrorMessages } from '../../utils/Constants.esm.js'; -import { StringUtils } from '../../node_modules/@azure/msal-common/dist/utils/StringUtils.esm.js'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -function redirectHandler() { - return async (req, res, next) => { - this.getLogger().trace("redirectHandler called"); - if (!req.body || !req.body.code) { - return next(new Error(ErrorMessages.AUTH_CODE_RESPONSE_NOT_FOUND)); - } - const tokenRequest = { - ...req.session.tokenRequestParams, - code: req.body.code - }; - try { - const msalInstance = this.getMsalClient(); - if (req.session.tokenCache) { - msalInstance.getTokenCache().deserialize(req.session.tokenCache); - } - const tokenResponse = await msalInstance.acquireTokenByCode(tokenRequest, req.body); - req.session.tokenCache = msalInstance.getTokenCache().serialize(); - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - req.session.account = tokenResponse.account; // account will never be null in this grant type - req.session.isAuthenticated = true; - const { redirectTo } = req.body.state ? - StringUtils.jsonParseHelper(this.getCryptoProvider().base64Decode(req.body.state)) - : - { redirectTo: "/" }; - res.redirect(redirectTo); - } - catch (error) { - next(error); - } - }; -} - -export { redirectHandler as default }; -//# sourceMappingURL=redirectHandler.esm.js.map diff --git a/Common/msal-node-wrapper/dist/middleware/handlers/redirectHandler.esm.js.map b/Common/msal-node-wrapper/dist/middleware/handlers/redirectHandler.esm.js.map deleted file mode 100644 index 9098feb..0000000 --- a/Common/msal-node-wrapper/dist/middleware/handlers/redirectHandler.esm.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"redirectHandler.esm.js","sources":["../../../src/middleware/handlers/redirectHandler.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;AAAA;;;AAGG;AASH,SAAS,eAAe,GAAA;IACpB,OAAO,OAAO,GAAY,EAAE,GAAa,EAAE,IAAkB,KAAmB;QAC5E,IAAI,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC;QAEjD,IAAI,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE;YAC7B,OAAO,IAAI,CAAC,IAAI,KAAK,CAAC,aAAa,CAAC,4BAA4B,CAAC,CAAC,CAAC;AACtE,SAAA;AAED,QAAA,MAAM,YAAY,GAAG;AACjB,YAAA,GAAG,GAAG,CAAC,OAAO,CAAC,kBAAkB;AACjC,YAAA,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC,IAAc;SACJ,CAAC;QAE9B,IAAI;AACA,YAAA,MAAM,YAAY,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC;AAE1C,YAAA,IAAI,GAAG,CAAC,OAAO,CAAC,UAAU,EAAE;AACxB,gBAAA,YAAY,CAAC,aAAa,EAAE,CAAC,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;AACpE,aAAA;AAED,YAAA,MAAM,aAAa,GAAG,MAAM,YAAY,CAAC,kBAAkB,CACvD,YAAY,EACZ,GAAG,CAAC,IAAgC,CACvC,CAAC;AAEF,YAAA,GAAG,CAAC,OAAO,CAAC,UAAU,GAAG,YAAY,CAAC,aAAa,EAAE,CAAC,SAAS,EAAE,CAAC;;YAElE,GAAG,CAAC,OAAO,CAAC,OAAO,GAAG,aAAa,CAAC,OAAQ,CAAC;AAC7C,YAAA,GAAG,CAAC,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC;YAEnC,MAAM,EAAE,UAAU,EAAE,GAAG,GAAG,CAAC,IAAI,CAAC,KAAK;AACjC,gBAAA,WAAW,CAAC,eAAe,CACvB,IAAI,CAAC,iBAAiB,EAAE,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,KAAe,CAAC,CACtD;;AAEb,oBAAA,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC;AAExB,YAAA,GAAG,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;AAC5B,SAAA;AAAC,QAAA,OAAO,KAAK,EAAE;YACZ,IAAI,CAAC,KAAK,CAAC,CAAC;AACf,SAAA;AACL,KAAC,CAAC;AACN;;;;"} \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/middleware/handlers/redirectHandler.js b/Common/msal-node-wrapper/dist/middleware/handlers/redirectHandler.js deleted file mode 100644 index c817cd2..0000000 --- a/Common/msal-node-wrapper/dist/middleware/handlers/redirectHandler.js +++ /dev/null @@ -1,45 +0,0 @@ -/*! msal-node-wrapper v1.0.0-beta 2023-06-25 */ -'use strict'; -'use strict'; - -var Constants = require('../../utils/Constants.js'); -var StringUtils = require('../../node_modules/@azure/msal-common/dist/utils/StringUtils.js'); - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -function redirectHandler() { - return async (req, res, next) => { - this.getLogger().trace("redirectHandler called"); - if (!req.body || !req.body.code) { - return next(new Error(Constants.ErrorMessages.AUTH_CODE_RESPONSE_NOT_FOUND)); - } - const tokenRequest = { - ...req.session.tokenRequestParams, - code: req.body.code - }; - try { - const msalInstance = this.getMsalClient(); - if (req.session.tokenCache) { - msalInstance.getTokenCache().deserialize(req.session.tokenCache); - } - const tokenResponse = await msalInstance.acquireTokenByCode(tokenRequest, req.body); - req.session.tokenCache = msalInstance.getTokenCache().serialize(); - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - req.session.account = tokenResponse.account; // account will never be null in this grant type - req.session.isAuthenticated = true; - const { redirectTo } = req.body.state ? - StringUtils.StringUtils.jsonParseHelper(this.getCryptoProvider().base64Decode(req.body.state)) - : - { redirectTo: "/" }; - res.redirect(redirectTo); - } - catch (error) { - next(error); - } - }; -} - -module.exports = redirectHandler; -//# sourceMappingURL=redirectHandler.js.map diff --git a/Common/msal-node-wrapper/dist/middleware/handlers/redirectHandler.js.map b/Common/msal-node-wrapper/dist/middleware/handlers/redirectHandler.js.map deleted file mode 100644 index 2af9b48..0000000 --- a/Common/msal-node-wrapper/dist/middleware/handlers/redirectHandler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"redirectHandler.js","sources":["../../../src/middleware/handlers/redirectHandler.ts"],"sourcesContent":[null],"names":["ErrorMessages","StringUtils"],"mappings":";;;;;;;AAAA;;;AAGG;AASH,SAAS,eAAe,GAAA;IACpB,OAAO,OAAO,GAAY,EAAE,GAAa,EAAE,IAAkB,KAAmB;QAC5E,IAAI,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC;QAEjD,IAAI,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE;YAC7B,OAAO,IAAI,CAAC,IAAI,KAAK,CAACA,uBAAa,CAAC,4BAA4B,CAAC,CAAC,CAAC;AACtE,SAAA;AAED,QAAA,MAAM,YAAY,GAAG;AACjB,YAAA,GAAG,GAAG,CAAC,OAAO,CAAC,kBAAkB;AACjC,YAAA,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC,IAAc;SACJ,CAAC;QAE9B,IAAI;AACA,YAAA,MAAM,YAAY,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC;AAE1C,YAAA,IAAI,GAAG,CAAC,OAAO,CAAC,UAAU,EAAE;AACxB,gBAAA,YAAY,CAAC,aAAa,EAAE,CAAC,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;AACpE,aAAA;AAED,YAAA,MAAM,aAAa,GAAG,MAAM,YAAY,CAAC,kBAAkB,CACvD,YAAY,EACZ,GAAG,CAAC,IAAgC,CACvC,CAAC;AAEF,YAAA,GAAG,CAAC,OAAO,CAAC,UAAU,GAAG,YAAY,CAAC,aAAa,EAAE,CAAC,SAAS,EAAE,CAAC;;YAElE,GAAG,CAAC,OAAO,CAAC,OAAO,GAAG,aAAa,CAAC,OAAQ,CAAC;AAC7C,YAAA,GAAG,CAAC,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC;YAEnC,MAAM,EAAE,UAAU,EAAE,GAAG,GAAG,CAAC,IAAI,CAAC,KAAK;AACjC,gBAAAC,uBAAW,CAAC,eAAe,CACvB,IAAI,CAAC,iBAAiB,EAAE,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,KAAe,CAAC,CACtD;;AAEb,oBAAA,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC;AAExB,YAAA,GAAG,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;AAC5B,SAAA;AAAC,QAAA,OAAO,KAAK,EAAE;YACZ,IAAI,CAAC,KAAK,CAAC,CAAC;AACf,SAAA;AACL,KAAC,CAAC;AACN;;;;"} \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/network/FetchManager.d.ts b/Common/msal-node-wrapper/dist/network/FetchManager.d.ts deleted file mode 100644 index c4c8b90..0000000 --- a/Common/msal-node-wrapper/dist/network/FetchManager.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { AxiosRequestConfig } from "axios"; -export declare class FetchManager { - /** - * Calls a resource endpoint - * @param {string} endpoint: URL of the endpoint to be called - * @returns {Promise} - */ - static callApiEndpoint: (endpoint: string, options?: AxiosRequestConfig) => Promise; - /** - * Calls a resource endpoint with a raw access token - * using the authorization bearer token scheme - * @param {string} endpoint: URL of the endpoint to be called - * @param {string} accessToken: Raw access token - * @returns {Promise} - */ - static callApiEndpointWithToken: (endpoint: string, accessToken: string) => Promise; - static fetchCloudDiscoveryMetadata(tenantId: string): Promise; - static fetchAuthorityMetadata(tenantId: string): Promise; - /** - * Handles queries against Microsoft Graph that return multiple pages of data - * @param {string} accessToken: access token required by endpoint - * @param {string} nextPage: next page link - * @param {Array} data: stores data from each page - * @returns {Promise} - */ - static handlePagination: (accessToken: string, nextPage: string, data?: string[]) => Promise; -} -//# sourceMappingURL=FetchManager.d.ts.map \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/network/FetchManager.d.ts.map b/Common/msal-node-wrapper/dist/network/FetchManager.d.ts.map deleted file mode 100644 index dde7459..0000000 --- a/Common/msal-node-wrapper/dist/network/FetchManager.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"FetchManager.d.ts","sourceRoot":"","sources":["../../src/network/FetchManager.ts"],"names":[],"mappings":"AAKA,OAAc,EAAiB,kBAAkB,EAAE,MAAM,OAAO,CAAC;AAIjE,qBAAa,YAAY;IACrB;;;;OAIG;IAEH,MAAM,CAAC,eAAe,aAAoB,MAAM,YAAY,kBAAkB,KAAG,QAAQ,GAAG,CAAC,CAO3F;IAEF;;;;;;OAMG;IAEH,MAAM,CAAC,wBAAwB,aAAoB,MAAM,eAAe,MAAM,KAAG,QAAQ,GAAG,CAAC,CAiB3F;WAEW,2BAA2B,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;WAiB9D,sBAAsB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAYtE;;;;;;OAMG;IACH,MAAM,CAAC,gBAAgB,gBAAuB,MAAM,YAAY,MAAM,SAAQ,MAAM,EAAE,KAAQ,QAAQ,MAAM,EAAE,CAAC,CAkB7G;CACL"} \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/network/FetchManager.esm.js b/Common/msal-node-wrapper/dist/network/FetchManager.esm.js deleted file mode 100644 index 3270c1a..0000000 --- a/Common/msal-node-wrapper/dist/network/FetchManager.esm.js +++ /dev/null @@ -1,105 +0,0 @@ -/*! msal-node-wrapper v1.0.0-beta 2023-06-25 */ -'use strict'; -import axios from 'axios'; -import { ErrorMessages, AccessControlConstants } from '../utils/Constants.esm.js'; -import { StringUtils } from '../node_modules/@azure/msal-common/dist/utils/StringUtils.esm.js'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -class FetchManager { - static async fetchCloudDiscoveryMetadata(tenantId) { - const endpoint = "https://login.microsoftonline.com/common/discovery/instance"; - try { - const response = await FetchManager.callApiEndpoint(endpoint, { - params: { - "api-version": "1.1", - "authorization_endpoint": `https://login.microsoftonline.com/${tenantId}/oauth2/v2.0/authorize` - } - }); - const cloudDiscoveryMetadata = JSON.stringify(response.data); - return cloudDiscoveryMetadata; - } - catch (error) { - throw error; - } - } - static async fetchAuthorityMetadata(tenantId) { - const endpoint = `https://login.microsoftonline.com/${tenantId}/v2.0/.well-known/openid-configuration`; - try { - const response = await FetchManager.callApiEndpoint(endpoint); - const authorityMetadata = JSON.stringify(response.data); - return authorityMetadata; - } - catch (error) { - throw error; - } - } -} -/** - * Calls a resource endpoint - * @param {string} endpoint: URL of the endpoint to be called - * @returns {Promise} - */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types -FetchManager.callApiEndpoint = async (endpoint, options) => { - try { - const response = await axios.get(endpoint, options); - return response; - } - catch (error) { - throw error; - } -}; -/** - * Calls a resource endpoint with a raw access token - * using the authorization bearer token scheme - * @param {string} endpoint: URL of the endpoint to be called - * @param {string} accessToken: Raw access token - * @returns {Promise} - */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -FetchManager.callApiEndpointWithToken = async (endpoint, accessToken) => { - if (StringUtils.isEmpty(accessToken)) { - throw new Error(ErrorMessages.TOKEN_NOT_FOUND); - } - const options = { - headers: { - Authorization: `Bearer ${accessToken}`, - }, - }; - try { - const response = await FetchManager.callApiEndpoint(endpoint, options); - return response.data; - } - catch (error) { - throw error; - } -}; -/** - * Handles queries against Microsoft Graph that return multiple pages of data - * @param {string} accessToken: access token required by endpoint - * @param {string} nextPage: next page link - * @param {Array} data: stores data from each page - * @returns {Promise} - */ -FetchManager.handlePagination = async (accessToken, nextPage, data = []) => { - try { - const graphResponse = await (await FetchManager.callApiEndpointWithToken(nextPage, accessToken)).data; - // eslint-disable-next-line @typescript-eslint/no-explicit-any - graphResponse["value"].map((v) => data.push(v.id)); - if (graphResponse[AccessControlConstants.PAGINATION_LINK]) { - return await FetchManager.handlePagination(accessToken, graphResponse[AccessControlConstants.PAGINATION_LINK], data); - } - else { - return data; - } - } - catch (error) { - throw error; - } -}; - -export { FetchManager }; -//# sourceMappingURL=FetchManager.esm.js.map diff --git a/Common/msal-node-wrapper/dist/network/FetchManager.esm.js.map b/Common/msal-node-wrapper/dist/network/FetchManager.esm.js.map deleted file mode 100644 index 1da9b77..0000000 --- a/Common/msal-node-wrapper/dist/network/FetchManager.esm.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"FetchManager.esm.js","sources":["../../src/network/FetchManager.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;AAAA;;;AAGG;MAMU,YAAY,CAAA;AA2CrB,IAAA,aAAa,2BAA2B,CAAC,QAAgB,EAAA;QACrD,MAAM,QAAQ,GAAG,6DAA6D,CAAC;QAE/E,IAAI;YACA,MAAM,QAAQ,GAAG,MAAM,YAAY,CAAC,eAAe,CAAC,QAAQ,EAAE;AAC1D,gBAAA,MAAM,EAAE;AACJ,oBAAA,aAAa,EAAE,KAAK;oBACpB,wBAAwB,EAAE,CAAqC,kCAAA,EAAA,QAAQ,CAAwB,sBAAA,CAAA;AAClG,iBAAA;AACJ,aAAA,CAAC,CAAC;YACH,MAAM,sBAAsB,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AAC7D,YAAA,OAAO,sBAAsB,CAAC;AACjC,SAAA;AAAC,QAAA,OAAO,KAAK,EAAE;AACZ,YAAA,MAAM,KAAK,CAAC;AACf,SAAA;KACJ;AAED,IAAA,aAAa,sBAAsB,CAAC,QAAgB,EAAA;AAChD,QAAA,MAAM,QAAQ,GAAG,CAAqC,kCAAA,EAAA,QAAQ,wCAAwC,CAAC;QAEvG,IAAI;YACA,MAAM,QAAQ,GAAG,MAAM,YAAY,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;YAC9D,MAAM,iBAAiB,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AACxD,YAAA,OAAO,iBAAiB,CAAC;AAC5B,SAAA;AAAC,QAAA,OAAO,KAAK,EAAE;AACZ,YAAA,MAAM,KAAK,CAAC;AACf,SAAA;KACJ;;AArED;;;;AAIG;AACH;AACO,YAAA,CAAA,eAAe,GAAG,OAAO,QAAgB,EAAE,OAA4B,KAAkB;IAC5F,IAAI;QACA,MAAM,QAAQ,GAAkB,MAAM,KAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;AACnE,QAAA,OAAO,QAAQ,CAAC;AACnB,KAAA;AAAC,IAAA,OAAO,KAAK,EAAE;AACZ,QAAA,MAAM,KAAK,CAAC;AACf,KAAA;AACL,CAAC,CAAC;AAEF;;;;;;AAMG;AACH;AACO,YAAA,CAAA,wBAAwB,GAAG,OAAO,QAAgB,EAAE,WAAmB,KAAkB;AAC5F,IAAA,IAAI,WAAW,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE;AAClC,QAAA,MAAM,IAAI,KAAK,CAAC,aAAa,CAAC,eAAe,CAAC,CAAC;AAClD,KAAA;AAED,IAAA,MAAM,OAAO,GAAuB;AAChC,QAAA,OAAO,EAAE;YACL,aAAa,EAAE,CAAU,OAAA,EAAA,WAAW,CAAE,CAAA;AACzC,SAAA;KACJ,CAAC;IAEF,IAAI;QACA,MAAM,QAAQ,GAAG,MAAM,YAAY,CAAC,eAAe,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QACvE,OAAO,QAAQ,CAAC,IAAI,CAAC;AACxB,KAAA;AAAC,IAAA,OAAO,KAAK,EAAE;AACZ,QAAA,MAAM,KAAK,CAAC;AACf,KAAA;AACL,CAAC,CAAC;AA+BF;;;;;;AAMG;AACI,YAAgB,CAAA,gBAAA,GAAG,OAAO,WAAmB,EAAE,QAAgB,EAAE,IAAA,GAAiB,EAAE,KAAuB;IAC9G,IAAI;AACA,QAAA,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,YAAY,CAAC,wBAAwB,CAAC,QAAQ,EAAE,WAAW,CAAC,EAAE,IAAI,CAAC;;QAEtG,aAAa,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAM,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAExD,QAAA,IAAI,aAAa,CAAC,sBAAsB,CAAC,eAAe,CAAC,EAAE;AACvD,YAAA,OAAO,MAAM,YAAY,CAAC,gBAAgB,CACtC,WAAW,EACX,aAAa,CAAC,sBAAsB,CAAC,eAAe,CAAC,EACrD,IAAI,CACP,CAAC;AACL,SAAA;AAAM,aAAA;AACH,YAAA,OAAO,IAAI,CAAC;AACf,SAAA;AACJ,KAAA;AAAC,IAAA,OAAO,KAAK,EAAE;AACZ,QAAA,MAAM,KAAK,CAAC;AACf,KAAA;AACL,CAAC;;;;"} \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/network/FetchManager.js b/Common/msal-node-wrapper/dist/network/FetchManager.js deleted file mode 100644 index da0c6c1..0000000 --- a/Common/msal-node-wrapper/dist/network/FetchManager.js +++ /dev/null @@ -1,107 +0,0 @@ -/*! msal-node-wrapper v1.0.0-beta 2023-06-25 */ -'use strict'; -'use strict'; - -var axios = require('axios'); -var Constants = require('../utils/Constants.js'); -var StringUtils = require('../node_modules/@azure/msal-common/dist/utils/StringUtils.js'); - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -class FetchManager { - static async fetchCloudDiscoveryMetadata(tenantId) { - const endpoint = "https://login.microsoftonline.com/common/discovery/instance"; - try { - const response = await FetchManager.callApiEndpoint(endpoint, { - params: { - "api-version": "1.1", - "authorization_endpoint": `https://login.microsoftonline.com/${tenantId}/oauth2/v2.0/authorize` - } - }); - const cloudDiscoveryMetadata = JSON.stringify(response.data); - return cloudDiscoveryMetadata; - } - catch (error) { - throw error; - } - } - static async fetchAuthorityMetadata(tenantId) { - const endpoint = `https://login.microsoftonline.com/${tenantId}/v2.0/.well-known/openid-configuration`; - try { - const response = await FetchManager.callApiEndpoint(endpoint); - const authorityMetadata = JSON.stringify(response.data); - return authorityMetadata; - } - catch (error) { - throw error; - } - } -} -/** - * Calls a resource endpoint - * @param {string} endpoint: URL of the endpoint to be called - * @returns {Promise} - */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types -FetchManager.callApiEndpoint = async (endpoint, options) => { - try { - const response = await axios.get(endpoint, options); - return response; - } - catch (error) { - throw error; - } -}; -/** - * Calls a resource endpoint with a raw access token - * using the authorization bearer token scheme - * @param {string} endpoint: URL of the endpoint to be called - * @param {string} accessToken: Raw access token - * @returns {Promise} - */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -FetchManager.callApiEndpointWithToken = async (endpoint, accessToken) => { - if (StringUtils.StringUtils.isEmpty(accessToken)) { - throw new Error(Constants.ErrorMessages.TOKEN_NOT_FOUND); - } - const options = { - headers: { - Authorization: `Bearer ${accessToken}`, - }, - }; - try { - const response = await FetchManager.callApiEndpoint(endpoint, options); - return response.data; - } - catch (error) { - throw error; - } -}; -/** - * Handles queries against Microsoft Graph that return multiple pages of data - * @param {string} accessToken: access token required by endpoint - * @param {string} nextPage: next page link - * @param {Array} data: stores data from each page - * @returns {Promise} - */ -FetchManager.handlePagination = async (accessToken, nextPage, data = []) => { - try { - const graphResponse = await (await FetchManager.callApiEndpointWithToken(nextPage, accessToken)).data; - // eslint-disable-next-line @typescript-eslint/no-explicit-any - graphResponse["value"].map((v) => data.push(v.id)); - if (graphResponse[Constants.AccessControlConstants.PAGINATION_LINK]) { - return await FetchManager.handlePagination(accessToken, graphResponse[Constants.AccessControlConstants.PAGINATION_LINK], data); - } - else { - return data; - } - } - catch (error) { - throw error; - } -}; - -exports.FetchManager = FetchManager; -//# sourceMappingURL=FetchManager.js.map diff --git a/Common/msal-node-wrapper/dist/network/FetchManager.js.map b/Common/msal-node-wrapper/dist/network/FetchManager.js.map deleted file mode 100644 index fb2bda8..0000000 --- a/Common/msal-node-wrapper/dist/network/FetchManager.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"FetchManager.js","sources":["../../src/network/FetchManager.ts"],"sourcesContent":[null],"names":["StringUtils","ErrorMessages","AccessControlConstants"],"mappings":";;;;;;;;AAAA;;;AAGG;MAMU,YAAY,CAAA;AA2CrB,IAAA,aAAa,2BAA2B,CAAC,QAAgB,EAAA;QACrD,MAAM,QAAQ,GAAG,6DAA6D,CAAC;QAE/E,IAAI;YACA,MAAM,QAAQ,GAAG,MAAM,YAAY,CAAC,eAAe,CAAC,QAAQ,EAAE;AAC1D,gBAAA,MAAM,EAAE;AACJ,oBAAA,aAAa,EAAE,KAAK;oBACpB,wBAAwB,EAAE,CAAqC,kCAAA,EAAA,QAAQ,CAAwB,sBAAA,CAAA;AAClG,iBAAA;AACJ,aAAA,CAAC,CAAC;YACH,MAAM,sBAAsB,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AAC7D,YAAA,OAAO,sBAAsB,CAAC;AACjC,SAAA;AAAC,QAAA,OAAO,KAAK,EAAE;AACZ,YAAA,MAAM,KAAK,CAAC;AACf,SAAA;KACJ;AAED,IAAA,aAAa,sBAAsB,CAAC,QAAgB,EAAA;AAChD,QAAA,MAAM,QAAQ,GAAG,CAAqC,kCAAA,EAAA,QAAQ,wCAAwC,CAAC;QAEvG,IAAI;YACA,MAAM,QAAQ,GAAG,MAAM,YAAY,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;YAC9D,MAAM,iBAAiB,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AACxD,YAAA,OAAO,iBAAiB,CAAC;AAC5B,SAAA;AAAC,QAAA,OAAO,KAAK,EAAE;AACZ,YAAA,MAAM,KAAK,CAAC;AACf,SAAA;KACJ;;AArED;;;;AAIG;AACH;AACO,YAAA,CAAA,eAAe,GAAG,OAAO,QAAgB,EAAE,OAA4B,KAAkB;IAC5F,IAAI;QACA,MAAM,QAAQ,GAAkB,MAAM,KAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;AACnE,QAAA,OAAO,QAAQ,CAAC;AACnB,KAAA;AAAC,IAAA,OAAO,KAAK,EAAE;AACZ,QAAA,MAAM,KAAK,CAAC;AACf,KAAA;AACL,CAAC,CAAC;AAEF;;;;;;AAMG;AACH;AACO,YAAA,CAAA,wBAAwB,GAAG,OAAO,QAAgB,EAAE,WAAmB,KAAkB;AAC5F,IAAA,IAAIA,uBAAW,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE;AAClC,QAAA,MAAM,IAAI,KAAK,CAACC,uBAAa,CAAC,eAAe,CAAC,CAAC;AAClD,KAAA;AAED,IAAA,MAAM,OAAO,GAAuB;AAChC,QAAA,OAAO,EAAE;YACL,aAAa,EAAE,CAAU,OAAA,EAAA,WAAW,CAAE,CAAA;AACzC,SAAA;KACJ,CAAC;IAEF,IAAI;QACA,MAAM,QAAQ,GAAG,MAAM,YAAY,CAAC,eAAe,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QACvE,OAAO,QAAQ,CAAC,IAAI,CAAC;AACxB,KAAA;AAAC,IAAA,OAAO,KAAK,EAAE;AACZ,QAAA,MAAM,KAAK,CAAC;AACf,KAAA;AACL,CAAC,CAAC;AA+BF;;;;;;AAMG;AACI,YAAgB,CAAA,gBAAA,GAAG,OAAO,WAAmB,EAAE,QAAgB,EAAE,IAAA,GAAiB,EAAE,KAAuB;IAC9G,IAAI;AACA,QAAA,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,YAAY,CAAC,wBAAwB,CAAC,QAAQ,EAAE,WAAW,CAAC,EAAE,IAAI,CAAC;;QAEtG,aAAa,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAM,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAExD,QAAA,IAAI,aAAa,CAACC,gCAAsB,CAAC,eAAe,CAAC,EAAE;AACvD,YAAA,OAAO,MAAM,YAAY,CAAC,gBAAgB,CACtC,WAAW,EACX,aAAa,CAACA,gCAAsB,CAAC,eAAe,CAAC,EACrD,IAAI,CACP,CAAC;AACL,SAAA;AAAM,aAAA;AACH,YAAA,OAAO,IAAI,CAAC;AACf,SAAA;AACJ,KAAA;AAAC,IAAA,OAAO,KAAK,EAAE;AACZ,QAAA,MAAM,KAAK,CAAC;AACf,KAAA;AACL,CAAC;;;;"} \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/packageMetadata.d.ts b/Common/msal-node-wrapper/dist/packageMetadata.d.ts deleted file mode 100644 index 16e9fc5..0000000 --- a/Common/msal-node-wrapper/dist/packageMetadata.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare const packageName = "msal-node-wrapper"; -export declare const packageVersion = "beta"; -//# sourceMappingURL=packageMetadata.d.ts.map \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/packageMetadata.d.ts.map b/Common/msal-node-wrapper/dist/packageMetadata.d.ts.map deleted file mode 100644 index bd80e17..0000000 --- a/Common/msal-node-wrapper/dist/packageMetadata.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"packageMetadata.d.ts","sourceRoot":"","sources":["../src/packageMetadata.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,WAAW,sBAAsB,CAAC;AAC/C,eAAO,MAAM,cAAc,SAAS,CAAC"} \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/packageMetadata.esm.js b/Common/msal-node-wrapper/dist/packageMetadata.esm.js deleted file mode 100644 index 7387762..0000000 --- a/Common/msal-node-wrapper/dist/packageMetadata.esm.js +++ /dev/null @@ -1,11 +0,0 @@ -/*! msal-node-wrapper v1.0.0-beta 2023-06-25 */ -'use strict'; -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const packageName = "msal-node-wrapper"; -const packageVersion = "beta"; - -export { packageName, packageVersion }; -//# sourceMappingURL=packageMetadata.esm.js.map diff --git a/Common/msal-node-wrapper/dist/packageMetadata.esm.js.map b/Common/msal-node-wrapper/dist/packageMetadata.esm.js.map deleted file mode 100644 index 8829ad0..0000000 --- a/Common/msal-node-wrapper/dist/packageMetadata.esm.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"packageMetadata.esm.js","sources":["../src/packageMetadata.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;;;AAGG;AAEI,MAAM,WAAW,GAAG,oBAAoB;AACxC,MAAM,cAAc,GAAG;;;;"} \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/packageMetadata.js b/Common/msal-node-wrapper/dist/packageMetadata.js deleted file mode 100644 index 74b6bf0..0000000 --- a/Common/msal-node-wrapper/dist/packageMetadata.js +++ /dev/null @@ -1,14 +0,0 @@ -/*! msal-node-wrapper v1.0.0-beta 2023-06-25 */ -'use strict'; -'use strict'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const packageName = "msal-node-wrapper"; -const packageVersion = "beta"; - -exports.packageName = packageName; -exports.packageVersion = packageVersion; -//# sourceMappingURL=packageMetadata.js.map diff --git a/Common/msal-node-wrapper/dist/packageMetadata.js.map b/Common/msal-node-wrapper/dist/packageMetadata.js.map deleted file mode 100644 index 6ae0001..0000000 --- a/Common/msal-node-wrapper/dist/packageMetadata.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"packageMetadata.js","sources":["../src/packageMetadata.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAAA;;;AAGG;AAEI,MAAM,WAAW,GAAG,oBAAoB;AACxC,MAAM,cAAc,GAAG;;;;;"} \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/provider/BaseAuthProvider.d.ts b/Common/msal-node-wrapper/dist/provider/BaseAuthProvider.d.ts deleted file mode 100644 index 8b0d709..0000000 --- a/Common/msal-node-wrapper/dist/provider/BaseAuthProvider.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Logger } from "@azure/msal-common"; -import { ConfidentialClientApplication, Configuration, CryptoProvider } from "@azure/msal-node"; -import { AuthConfig } from "../config/ConfigurationTypes"; -export declare abstract class BaseAuthProvider { - protected authConfig: AuthConfig; - protected msalConfig: Configuration; - protected cryptoProvider: CryptoProvider; - protected logger: Logger; - protected constructor(authConfig: AuthConfig, msalConfig: Configuration); - getAuthConfig(): AuthConfig; - getMsalConfig(): Configuration; - getCryptoProvider(): CryptoProvider; - getLogger(): Logger; - getMsalClient(): ConfidentialClientApplication; -} -//# sourceMappingURL=BaseAuthProvider.d.ts.map \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/provider/BaseAuthProvider.d.ts.map b/Common/msal-node-wrapper/dist/provider/BaseAuthProvider.d.ts.map deleted file mode 100644 index b2cb0b5..0000000 --- a/Common/msal-node-wrapper/dist/provider/BaseAuthProvider.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"BaseAuthProvider.d.ts","sourceRoot":"","sources":["../../src/provider/BaseAuthProvider.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,6BAA6B,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAChG,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAI1D,8BAAsB,gBAAgB;IAClC,SAAS,CAAC,UAAU,EAAE,UAAU,CAAC;IACjC,SAAS,CAAC,UAAU,EAAE,aAAa,CAAC;IACpC,SAAS,CAAC,cAAc,EAAE,cAAc,CAAC;IACzC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC;IAEzB,SAAS,aAAa,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,aAAa;IAWvE,aAAa,IAAI,UAAU;IAI3B,aAAa,IAAI,aAAa;IAI9B,iBAAiB,IAAI,cAAc;IAInC,SAAS,IAAI,MAAM;IAInB,aAAa,IAAI,6BAA6B;CAGjD"} \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/provider/BaseAuthProvider.esm.js b/Common/msal-node-wrapper/dist/provider/BaseAuthProvider.esm.js deleted file mode 100644 index e3b6b41..0000000 --- a/Common/msal-node-wrapper/dist/provider/BaseAuthProvider.esm.js +++ /dev/null @@ -1,37 +0,0 @@ -/*! msal-node-wrapper v1.0.0-beta 2023-06-25 */ -'use strict'; -import { CryptoProvider, ConfidentialClientApplication } from '@azure/msal-node'; -import { DEFAULT_LOGGER_OPTIONS } from '../utils/Constants.esm.js'; -import { packageName, packageVersion } from '../packageMetadata.esm.js'; -import { Logger } from '../node_modules/@azure/msal-common/dist/logger/Logger.esm.js'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -class BaseAuthProvider { - constructor(authConfig, msalConfig) { - this.authConfig = authConfig; - this.msalConfig = msalConfig; - this.cryptoProvider = new CryptoProvider(); - this.logger = new Logger(this.msalConfig.system?.loggerOptions || DEFAULT_LOGGER_OPTIONS, packageName, packageVersion); - } - getAuthConfig() { - return this.authConfig; - } - getMsalConfig() { - return this.msalConfig; - } - getCryptoProvider() { - return this.cryptoProvider; - } - getLogger() { - return this.logger; - } - getMsalClient() { - return new ConfidentialClientApplication(this.msalConfig); - } -} - -export { BaseAuthProvider }; -//# sourceMappingURL=BaseAuthProvider.esm.js.map diff --git a/Common/msal-node-wrapper/dist/provider/BaseAuthProvider.esm.js.map b/Common/msal-node-wrapper/dist/provider/BaseAuthProvider.esm.js.map deleted file mode 100644 index 1afc746..0000000 --- a/Common/msal-node-wrapper/dist/provider/BaseAuthProvider.esm.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"BaseAuthProvider.esm.js","sources":["../../src/provider/BaseAuthProvider.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;AAAA;;;AAGG;MAQmB,gBAAgB,CAAA;IAMlC,WAAsB,CAAA,UAAsB,EAAE,UAAyB,EAAA;AACnE,QAAA,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;AAC7B,QAAA,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;AAC7B,QAAA,IAAI,CAAC,cAAc,GAAG,IAAI,cAAc,EAAE,CAAC;QAC3C,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CACpB,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,aAAa,IAAI,sBAAsB,EAC/D,WAAW,EACX,cAAc,CACjB,CAAC;KACL;IAED,aAAa,GAAA;QACT,OAAO,IAAI,CAAC,UAAU,CAAC;KAC1B;IAED,aAAa,GAAA;QACT,OAAO,IAAI,CAAC,UAAU,CAAC;KAC1B;IAED,iBAAiB,GAAA;QACb,OAAO,IAAI,CAAC,cAAc,CAAC;KAC9B;IAED,SAAS,GAAA;QACL,OAAO,IAAI,CAAC,MAAM,CAAC;KACtB;IAED,aAAa,GAAA;AACT,QAAA,OAAO,IAAI,6BAA6B,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;KAC7D;AACJ;;;;"} \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/provider/BaseAuthProvider.js b/Common/msal-node-wrapper/dist/provider/BaseAuthProvider.js deleted file mode 100644 index 3e30f04..0000000 --- a/Common/msal-node-wrapper/dist/provider/BaseAuthProvider.js +++ /dev/null @@ -1,39 +0,0 @@ -/*! msal-node-wrapper v1.0.0-beta 2023-06-25 */ -'use strict'; -'use strict'; - -var msalNode = require('@azure/msal-node'); -var Constants = require('../utils/Constants.js'); -var packageMetadata = require('../packageMetadata.js'); -var Logger = require('../node_modules/@azure/msal-common/dist/logger/Logger.js'); - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -class BaseAuthProvider { - constructor(authConfig, msalConfig) { - this.authConfig = authConfig; - this.msalConfig = msalConfig; - this.cryptoProvider = new msalNode.CryptoProvider(); - this.logger = new Logger.Logger(this.msalConfig.system?.loggerOptions || Constants.DEFAULT_LOGGER_OPTIONS, packageMetadata.packageName, packageMetadata.packageVersion); - } - getAuthConfig() { - return this.authConfig; - } - getMsalConfig() { - return this.msalConfig; - } - getCryptoProvider() { - return this.cryptoProvider; - } - getLogger() { - return this.logger; - } - getMsalClient() { - return new msalNode.ConfidentialClientApplication(this.msalConfig); - } -} - -exports.BaseAuthProvider = BaseAuthProvider; -//# sourceMappingURL=BaseAuthProvider.js.map diff --git a/Common/msal-node-wrapper/dist/provider/BaseAuthProvider.js.map b/Common/msal-node-wrapper/dist/provider/BaseAuthProvider.js.map deleted file mode 100644 index 61a2060..0000000 --- a/Common/msal-node-wrapper/dist/provider/BaseAuthProvider.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"BaseAuthProvider.js","sources":["../../src/provider/BaseAuthProvider.ts"],"sourcesContent":[null],"names":["CryptoProvider","Logger","DEFAULT_LOGGER_OPTIONS","packageName","packageVersion","ConfidentialClientApplication"],"mappings":";;;;;;;;;AAAA;;;AAGG;MAQmB,gBAAgB,CAAA;IAMlC,WAAsB,CAAA,UAAsB,EAAE,UAAyB,EAAA;AACnE,QAAA,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;AAC7B,QAAA,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;AAC7B,QAAA,IAAI,CAAC,cAAc,GAAG,IAAIA,uBAAc,EAAE,CAAC;QAC3C,IAAI,CAAC,MAAM,GAAG,IAAIC,aAAM,CACpB,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,aAAa,IAAIC,gCAAsB,EAC/DC,2BAAW,EACXC,8BAAc,CACjB,CAAC;KACL;IAED,aAAa,GAAA;QACT,OAAO,IAAI,CAAC,UAAU,CAAC;KAC1B;IAED,aAAa,GAAA;QACT,OAAO,IAAI,CAAC,UAAU,CAAC;KAC1B;IAED,iBAAiB,GAAA;QACb,OAAO,IAAI,CAAC,cAAc,CAAC;KAC9B;IAED,SAAS,GAAA;QACL,OAAO,IAAI,CAAC,MAAM,CAAC;KACtB;IAED,aAAa,GAAA;AACT,QAAA,OAAO,IAAIC,sCAA6B,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;KAC7D;AACJ;;;;"} \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/provider/WebAppAuthProvider.d.ts b/Common/msal-node-wrapper/dist/provider/WebAppAuthProvider.d.ts deleted file mode 100644 index 3dc8904..0000000 --- a/Common/msal-node-wrapper/dist/provider/WebAppAuthProvider.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { ErrorRequestHandler, RequestHandler } from "express"; -import { BaseAuthProvider } from "./BaseAuthProvider"; -import { AuthConfig, WebAppAuthConfig } from "../config/ConfigurationTypes"; -import { AuthenticateMiddlewareOptions, RouteGuardOptions } from "../middleware/MiddlewareOptions"; -export declare class WebAppAuthProvider extends BaseAuthProvider { - webAppAuthConfig: WebAppAuthConfig; - private constructor(); - /** - * Static method to async initialize WebAppAuthProvider - * @param {AuthenticateMiddlewareOptions} authConfig: configuration object - * @returns {Promise} - */ - static initialize(authConfig: AuthConfig): Promise; - /** - * Sets request context, default routes and handlers - * @param {AuthenticateMiddlewareOptions} options: options to modify middleware behavior - * @returns {RequestHandler} - */ - authenticate(options?: AuthenticateMiddlewareOptions): RequestHandler; - /** - * Guards a specified route with given options - * @param {RouteGuardOptions} options: options to modify middleware behavior - * @returns {RequestHandler} - */ - guard(options?: RouteGuardOptions): RequestHandler; - /** - * Middleware to handle interaction required errors - * @returns {ErrorRequestHandler} - */ - interactionErrorHandler(): ErrorRequestHandler; -} -//# sourceMappingURL=WebAppAuthProvider.d.ts.map \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/provider/WebAppAuthProvider.d.ts.map b/Common/msal-node-wrapper/dist/provider/WebAppAuthProvider.d.ts.map deleted file mode 100644 index f7fbb2b..0000000 --- a/Common/msal-node-wrapper/dist/provider/WebAppAuthProvider.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"WebAppAuthProvider.d.ts","sourceRoot":"","sources":["../../src/provider/WebAppAuthProvider.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAGtD,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAW,MAAM,8BAA8B,CAAC;AACrF,OAAO,EAAE,6BAA6B,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAKnG,qBAAa,kBAAmB,SAAQ,gBAAgB;IACpD,gBAAgB,EAAE,gBAAgB,CAAC;IAEnC,OAAO;IAKP;;;;OAIG;WACU,UAAU,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAyB5E;;;;OAIG;IACH,YAAY,CAAC,OAAO,GAAE,6BAErB,GAAG,cAAc;IAIlB;;;;OAIG;IACH,KAAK,CAAC,OAAO,GAAE,iBAEd,GAAG,cAAc;IAIlB;;;OAGG;IACH,uBAAuB,IAAI,mBAAmB;CAGjD"} \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/provider/WebAppAuthProvider.esm.js b/Common/msal-node-wrapper/dist/provider/WebAppAuthProvider.esm.js deleted file mode 100644 index 3af6891..0000000 --- a/Common/msal-node-wrapper/dist/provider/WebAppAuthProvider.esm.js +++ /dev/null @@ -1,73 +0,0 @@ -/*! msal-node-wrapper v1.0.0-beta 2023-06-25 */ -'use strict'; -import { BaseAuthProvider } from './BaseAuthProvider.esm.js'; -import { ConfigurationHelper } from '../config/ConfigurationHelper.esm.js'; -import { FetchManager } from '../network/FetchManager.esm.js'; -import { AppType } from '../config/ConfigurationTypes.esm.js'; -import authenticateMiddleware from '../middleware/authenticateMiddleware.esm.js'; -import guardMiddleware from '../middleware/guardMiddleware.esm.js'; -import errorMiddleware from '../middleware/errorMiddleware.esm.js'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -class WebAppAuthProvider extends BaseAuthProvider { - constructor(authConfig, msalConfig) { - super(authConfig, msalConfig); - this.webAppAuthConfig = authConfig; - } - /** - * Static method to async initialize WebAppAuthProvider - * @param {AuthenticateMiddlewareOptions} authConfig: configuration object - * @returns {Promise} - */ - static async initialize(authConfig) { - ConfigurationHelper.validateAuthConfig(authConfig, AppType.WebApp); - const msalConfig = ConfigurationHelper.getMsalConfiguration(authConfig); - if (!msalConfig.auth.cloudDiscoveryMetadata && !msalConfig.auth.authorityMetadata) { - const isB2C = authConfig.auth.authority && ConfigurationHelper.isB2CAuthority(authConfig.auth.authority); - if (!isB2C) { - const tenantId = authConfig.auth.authority ? - ConfigurationHelper.getTenantIdFromAuthority(authConfig.auth.authority) : "common"; - const [discoveryMetadata, authorityMetadata] = await Promise.all([ - FetchManager.fetchCloudDiscoveryMetadata(tenantId), - FetchManager.fetchAuthorityMetadata(tenantId), - ]); - msalConfig.auth.cloudDiscoveryMetadata = discoveryMetadata; - msalConfig.auth.authorityMetadata = authorityMetadata; - } - } - return new WebAppAuthProvider(authConfig, msalConfig); - } - /** - * Sets request context, default routes and handlers - * @param {AuthenticateMiddlewareOptions} options: options to modify middleware behavior - * @returns {RequestHandler} - */ - authenticate(options = { - protectAllRoutes: false, - }) { - return authenticateMiddleware.call(this, options); - } - /** - * Guards a specified route with given options - * @param {RouteGuardOptions} options: options to modify middleware behavior - * @returns {RequestHandler} - */ - guard(options = { - forceLogin: true, - }) { - return guardMiddleware.call(this, options); - } - /** - * Middleware to handle interaction required errors - * @returns {ErrorRequestHandler} - */ - interactionErrorHandler() { - return errorMiddleware.call(this); - } -} - -export { WebAppAuthProvider }; -//# sourceMappingURL=WebAppAuthProvider.esm.js.map diff --git a/Common/msal-node-wrapper/dist/provider/WebAppAuthProvider.esm.js.map b/Common/msal-node-wrapper/dist/provider/WebAppAuthProvider.esm.js.map deleted file mode 100644 index f546453..0000000 --- a/Common/msal-node-wrapper/dist/provider/WebAppAuthProvider.esm.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"WebAppAuthProvider.esm.js","sources":["../../src/provider/WebAppAuthProvider.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;AAAA;;;AAGG;AAaG,MAAO,kBAAmB,SAAQ,gBAAgB,CAAA;IAGpD,WAAoB,CAAA,UAAsB,EAAE,UAAyB,EAAA;AACjE,QAAA,KAAK,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;AAC9B,QAAA,IAAI,CAAC,gBAAgB,GAAG,UAA8B,CAAC;KAC1D;AAED;;;;AAIG;AACH,IAAA,aAAa,UAAU,CAAC,UAAsB,EAAA;QAC1C,mBAAmB,CAAC,kBAAkB,CAAC,UAAU,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;QAEnE,MAAM,UAAU,GAAG,mBAAmB,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC;AAExE,QAAA,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,sBAAsB,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,iBAAiB,EAAE;AAC/E,YAAA,MAAM,KAAK,GAAG,UAAU,CAAC,IAAI,CAAC,SAAS,IAAI,mBAAmB,CAAC,cAAc,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;YAEzG,IAAI,CAAC,KAAK,EAAE;gBACR,MAAM,QAAQ,GAAG,UAAU,CAAC,IAAI,CAAC,SAAS;AACtC,oBAAA,mBAAmB,CAAC,wBAAwB,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,QAAQ,CAAC;gBAEvF,MAAM,CAAC,iBAAiB,EAAE,iBAAiB,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;AAC7D,oBAAA,YAAY,CAAC,2BAA2B,CAAC,QAAQ,CAAC;AAClD,oBAAA,YAAY,CAAC,sBAAsB,CAAC,QAAQ,CAAC;AAChD,iBAAA,CAAC,CAAC;AAEH,gBAAA,UAAU,CAAC,IAAI,CAAC,sBAAsB,GAAG,iBAAiB,CAAC;AAC3D,gBAAA,UAAU,CAAC,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;AACzD,aAAA;AACJ,SAAA;AAED,QAAA,OAAO,IAAI,kBAAkB,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;KACzD;AAED;;;;AAIG;AACH,IAAA,YAAY,CAAC,OAAyC,GAAA;AAClD,QAAA,gBAAgB,EAAE,KAAK;AAC1B,KAAA,EAAA;QACG,OAAO,sBAAsB,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;KACrD;AAED;;;;AAIG;AACH,IAAA,KAAK,CAAC,OAA6B,GAAA;AAC/B,QAAA,UAAU,EAAE,IAAI;AACnB,KAAA,EAAA;QACG,OAAO,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;KAC9C;AAED;;;AAGG;IACH,uBAAuB,GAAA;AACnB,QAAA,OAAO,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KACrC;AACJ;;;;"} \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/provider/WebAppAuthProvider.js b/Common/msal-node-wrapper/dist/provider/WebAppAuthProvider.js deleted file mode 100644 index b054bd9..0000000 --- a/Common/msal-node-wrapper/dist/provider/WebAppAuthProvider.js +++ /dev/null @@ -1,75 +0,0 @@ -/*! msal-node-wrapper v1.0.0-beta 2023-06-25 */ -'use strict'; -'use strict'; - -var BaseAuthProvider = require('./BaseAuthProvider.js'); -var ConfigurationHelper = require('../config/ConfigurationHelper.js'); -var FetchManager = require('../network/FetchManager.js'); -var ConfigurationTypes = require('../config/ConfigurationTypes.js'); -var authenticateMiddleware = require('../middleware/authenticateMiddleware.js'); -var guardMiddleware = require('../middleware/guardMiddleware.js'); -var errorMiddleware = require('../middleware/errorMiddleware.js'); - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -class WebAppAuthProvider extends BaseAuthProvider.BaseAuthProvider { - constructor(authConfig, msalConfig) { - super(authConfig, msalConfig); - this.webAppAuthConfig = authConfig; - } - /** - * Static method to async initialize WebAppAuthProvider - * @param {AuthenticateMiddlewareOptions} authConfig: configuration object - * @returns {Promise} - */ - static async initialize(authConfig) { - ConfigurationHelper.ConfigurationHelper.validateAuthConfig(authConfig, ConfigurationTypes.AppType.WebApp); - const msalConfig = ConfigurationHelper.ConfigurationHelper.getMsalConfiguration(authConfig); - if (!msalConfig.auth.cloudDiscoveryMetadata && !msalConfig.auth.authorityMetadata) { - const isB2C = authConfig.auth.authority && ConfigurationHelper.ConfigurationHelper.isB2CAuthority(authConfig.auth.authority); - if (!isB2C) { - const tenantId = authConfig.auth.authority ? - ConfigurationHelper.ConfigurationHelper.getTenantIdFromAuthority(authConfig.auth.authority) : "common"; - const [discoveryMetadata, authorityMetadata] = await Promise.all([ - FetchManager.FetchManager.fetchCloudDiscoveryMetadata(tenantId), - FetchManager.FetchManager.fetchAuthorityMetadata(tenantId), - ]); - msalConfig.auth.cloudDiscoveryMetadata = discoveryMetadata; - msalConfig.auth.authorityMetadata = authorityMetadata; - } - } - return new WebAppAuthProvider(authConfig, msalConfig); - } - /** - * Sets request context, default routes and handlers - * @param {AuthenticateMiddlewareOptions} options: options to modify middleware behavior - * @returns {RequestHandler} - */ - authenticate(options = { - protectAllRoutes: false, - }) { - return authenticateMiddleware.call(this, options); - } - /** - * Guards a specified route with given options - * @param {RouteGuardOptions} options: options to modify middleware behavior - * @returns {RequestHandler} - */ - guard(options = { - forceLogin: true, - }) { - return guardMiddleware.call(this, options); - } - /** - * Middleware to handle interaction required errors - * @returns {ErrorRequestHandler} - */ - interactionErrorHandler() { - return errorMiddleware.call(this); - } -} - -exports.WebAppAuthProvider = WebAppAuthProvider; -//# sourceMappingURL=WebAppAuthProvider.js.map diff --git a/Common/msal-node-wrapper/dist/provider/WebAppAuthProvider.js.map b/Common/msal-node-wrapper/dist/provider/WebAppAuthProvider.js.map deleted file mode 100644 index a33f746..0000000 --- a/Common/msal-node-wrapper/dist/provider/WebAppAuthProvider.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"WebAppAuthProvider.js","sources":["../../src/provider/WebAppAuthProvider.ts"],"sourcesContent":[null],"names":["BaseAuthProvider","ConfigurationHelper","AppType","FetchManager"],"mappings":";;;;;;;;;;;;AAAA;;;AAGG;AAaG,MAAO,kBAAmB,SAAQA,iCAAgB,CAAA;IAGpD,WAAoB,CAAA,UAAsB,EAAE,UAAyB,EAAA;AACjE,QAAA,KAAK,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;AAC9B,QAAA,IAAI,CAAC,gBAAgB,GAAG,UAA8B,CAAC;KAC1D;AAED;;;;AAIG;AACH,IAAA,aAAa,UAAU,CAAC,UAAsB,EAAA;QAC1CC,uCAAmB,CAAC,kBAAkB,CAAC,UAAU,EAAEC,0BAAO,CAAC,MAAM,CAAC,CAAC;QAEnE,MAAM,UAAU,GAAGD,uCAAmB,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC;AAExE,QAAA,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,sBAAsB,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,iBAAiB,EAAE;AAC/E,YAAA,MAAM,KAAK,GAAG,UAAU,CAAC,IAAI,CAAC,SAAS,IAAIA,uCAAmB,CAAC,cAAc,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;YAEzG,IAAI,CAAC,KAAK,EAAE;gBACR,MAAM,QAAQ,GAAG,UAAU,CAAC,IAAI,CAAC,SAAS;AACtC,oBAAAA,uCAAmB,CAAC,wBAAwB,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,QAAQ,CAAC;gBAEvF,MAAM,CAAC,iBAAiB,EAAE,iBAAiB,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;AAC7D,oBAAAE,yBAAY,CAAC,2BAA2B,CAAC,QAAQ,CAAC;AAClD,oBAAAA,yBAAY,CAAC,sBAAsB,CAAC,QAAQ,CAAC;AAChD,iBAAA,CAAC,CAAC;AAEH,gBAAA,UAAU,CAAC,IAAI,CAAC,sBAAsB,GAAG,iBAAiB,CAAC;AAC3D,gBAAA,UAAU,CAAC,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;AACzD,aAAA;AACJ,SAAA;AAED,QAAA,OAAO,IAAI,kBAAkB,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;KACzD;AAED;;;;AAIG;AACH,IAAA,YAAY,CAAC,OAAyC,GAAA;AAClD,QAAA,gBAAgB,EAAE,KAAK;AAC1B,KAAA,EAAA;QACG,OAAO,sBAAsB,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;KACrD;AAED;;;;AAIG;AACH,IAAA,KAAK,CAAC,OAA6B,GAAA;AAC/B,QAAA,UAAU,EAAE,IAAI;AACnB,KAAA,EAAA;QACG,OAAO,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;KAC9C;AAED;;;AAGG;IACH,uBAAuB,GAAA;AACnB,QAAA,OAAO,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KACrC;AACJ;;;;"} \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/utils/Constants.d.ts b/Common/msal-node-wrapper/dist/utils/Constants.d.ts deleted file mode 100644 index ed6fd44..0000000 --- a/Common/msal-node-wrapper/dist/utils/Constants.d.ts +++ /dev/null @@ -1,113 +0,0 @@ -import { LoggerOptions } from "@azure/msal-common"; -/** - * Basic authentication stages used to determine - * appropriate action after redirect occurs - */ -export declare enum AppStages { - SIGN_IN = "sign_in", - SIGN_OUT = "sign_out", - ACQUIRE_TOKEN = "acquire_token" -} -/** - * String constants related to AAD Authority - */ -export declare const AADAuthorityConstants: { - COMMON: string; - ORGANIZATIONS: string; - CONSUMERS: string; -}; -export declare const OIDC_SCOPES: string[]; -/** - * Constants used in access control scenarios - */ -export declare const AccessControlConstants: { - GROUPS: string; - ROLES: string; - CLAIM_NAMES: string; - CLAIM_SOURCES: string; - PAGINATION_LINK: string; - GRAPH_MEMBERS_ENDPOINT: string; - GRAPH_MEMBER_SCOPES: string; -}; -/** - * Various information constants - */ -export declare const InfoMessages: { - REQUEST_FOR_RESOURCE: string; - OVERAGE_OCCURRED: string; -}; -/** - * Various error constants - */ -export declare const ErrorMessages: { - NOT_PERMITTED: string; - INVALID_TOKEN: string; - CANNOT_DETERMINE_APP_STAGE: string; - CANNOT_VALIDATE_TOKEN: string; - CSRF_TOKEN_MISMATCH: string; - INTERACTION_REQUIRED: string; - TOKEN_ACQUISITION_FAILED: string; - TOKEN_RESPONSE_NULL: string; - AUTH_CODE_URL_NOT_OBTAINED: string; - TOKEN_NOT_FOUND: string; - TOKEN_NOT_DECODED: string; - TOKEN_NOT_VERIFIED: string; - KEYS_NOT_OBTAINED: string; - STATE_NOT_FOUND: string; - USER_HAS_NO_ROLE: string; - USER_NOT_IN_ROLE: string; - USER_HAS_NO_GROUP: string; - USER_NOT_IN_GROUP: string; - METHOD_NOT_ALLOWED: string; - RULE_NOT_FOUND: string; - SESSION_NOT_FOUND: string; - KEY_VAULT_CONFIG_NOT_FOUND: string; - CANNOT_OBTAIN_CREDENTIALS_FROM_KEY_VAULT: string; - SESSION_KEY_NOT_FOUND: string; - AUTH_CODE_REQUEST_OBJECT_NOT_FOUND: string; - ID_TOKEN_CLAIMS_NOT_FOUND: string; - AUTH_CODE_RESPONSE_NOT_FOUND: string; -}; -/** - * Various configuration error constants - */ -export declare const ConfigurationErrorMessages: { - AUTH_ROUTES_NOT_CONFIGURED: string; - NO_PROTECTED_RESOURCE_CONFIGURED: string; - NO_ACCESS_MATRIX_CONFIGURED: string; - NO_CLIENT_ID: string; - INVALID_CLIENT_ID: string; - NO_TENANT_INFO: string; - INVALID_TENANT_INFO: string; - NO_CLIENT_CREDENTIAL: string; - NO_REDIRECT_URI: string; - NO_UNAUTHORIZED_ROUTE: string; -}; -/** - * For more information, visit: https://login.microsoftonline.com/error - */ -export declare const ErrorCodes: { - 65001: string; - 50076: string; - 50079: string; - 50001: string; - 65004: string; - 70011: string; - 700022: string; - 700020: string; - 90118: string; -}; -/** - * Default logger options - */ -export declare const DEFAULT_LOGGER_OPTIONS: LoggerOptions; -export declare const HttpMethods: { - GET: string; - POST: string; - PUT: string; - PATCH: string; - DELETE: string; - OPTIONS: string; -}; -export declare const EMPTY_STRING = ""; -//# sourceMappingURL=Constants.d.ts.map \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/utils/Constants.d.ts.map b/Common/msal-node-wrapper/dist/utils/Constants.d.ts.map deleted file mode 100644 index 07f2037..0000000 --- a/Common/msal-node-wrapper/dist/utils/Constants.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Constants.d.ts","sourceRoot":"","sources":["../../src/utils/Constants.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAiC,MAAM,oBAAoB,CAAC;AAElF;;;GAGG;AACH,oBAAY,SAAS;IACjB,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,aAAa,kBAAkB;CAClC;AAED;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;;CAIjC,CAAC;AAEF,eAAO,MAAM,WAAW,UAAoC,CAAC;AAE7D;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;CAQlC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY;;;CAGxB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4BzB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;CAWtC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;CAUtB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,sBAAsB,EAAE,aAUpC,CAAC;AAEF,eAAO,MAAM,WAAW;;;;;;;CAOvB,CAAC;AAEF,eAAO,MAAM,YAAY,KAAK,CAAC"} \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/utils/Constants.esm.js b/Common/msal-node-wrapper/dist/utils/Constants.esm.js deleted file mode 100644 index 8cd572c..0000000 --- a/Common/msal-node-wrapper/dist/utils/Constants.esm.js +++ /dev/null @@ -1,97 +0,0 @@ -/*! msal-node-wrapper v1.0.0-beta 2023-06-25 */ -'use strict'; -import { OIDC_DEFAULT_SCOPES } from '../node_modules/@azure/msal-common/dist/utils/Constants.esm.js'; -import { LogLevel } from '../node_modules/@azure/msal-common/dist/logger/Logger.esm.js'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Basic authentication stages used to determine - * appropriate action after redirect occurs - */ -var AppStages; -(function (AppStages) { - AppStages["SIGN_IN"] = "sign_in"; - AppStages["SIGN_OUT"] = "sign_out"; - AppStages["ACQUIRE_TOKEN"] = "acquire_token"; -})(AppStages || (AppStages = {})); -const OIDC_SCOPES = [...OIDC_DEFAULT_SCOPES, "email"]; -/** - * Constants used in access control scenarios - */ -const AccessControlConstants = { - GROUPS: "groups", - ROLES: "roles", - CLAIM_NAMES: "_claim_name", - CLAIM_SOURCES: "_claim_sources", - PAGINATION_LINK: "@odata.nextLink", - GRAPH_MEMBERS_ENDPOINT: "https://graph.microsoft.com/v1.0/me/memberOf", - GRAPH_MEMBER_SCOPES: "User.Read GroupMember.Read.All", -}; -/** - * Various error constants - */ -const ErrorMessages = { - NOT_PERMITTED: "Not permitted", - INVALID_TOKEN: "Invalid token", - CANNOT_DETERMINE_APP_STAGE: "Cannot determine application stage", - CANNOT_VALIDATE_TOKEN: "Cannot validate token", - CSRF_TOKEN_MISMATCH: "CSRF token in response does not match to original request", - INTERACTION_REQUIRED: "interaction_required", - TOKEN_ACQUISITION_FAILED: "Token acquisition failed", - TOKEN_RESPONSE_NULL: "Token response is null", - AUTH_CODE_URL_NOT_OBTAINED: "Authorization code url cannot be obtained", - TOKEN_NOT_FOUND: "No token found", - TOKEN_NOT_DECODED: "Token cannot be decoded", - TOKEN_NOT_VERIFIED: "Token cannot be verified", - KEYS_NOT_OBTAINED: "Signing keys cannot be obtained", - STATE_NOT_FOUND: "State not found", - USER_HAS_NO_ROLE: "User does not have any roles", - USER_NOT_IN_ROLE: "User does not have this role", - USER_HAS_NO_GROUP: "User does not have any groups", - USER_NOT_IN_GROUP: "User does not have this group", - METHOD_NOT_ALLOWED: "Method not allowed for this route", - RULE_NOT_FOUND: "No rule found for this route", - SESSION_NOT_FOUND: "No session found for this request", - KEY_VAULT_CONFIG_NOT_FOUND: "No coordinates found for Key Vault", - CANNOT_OBTAIN_CREDENTIALS_FROM_KEY_VAULT: "Cannot obtain credentials from Key Vault", - SESSION_KEY_NOT_FOUND: "No session key found in session. Cannot encrypt state data", - AUTH_CODE_REQUEST_OBJECT_NOT_FOUND: "No auth code request object found in session", - ID_TOKEN_CLAIMS_NOT_FOUND: "No id token claims found in session", - AUTH_CODE_RESPONSE_NOT_FOUND: "No authorization code found in the response from service", -}; -/** - * Various configuration error constants - */ -const ConfigurationErrorMessages = { - AUTH_ROUTES_NOT_CONFIGURED: "Authentication routes are not defined. Ensure that the application settings are configured properly.", - NO_PROTECTED_RESOURCE_CONFIGURED: "No protected resource is configured to acquire a token for. Ensure that the application settings are configured properly.", - NO_ACCESS_MATRIX_CONFIGURED: "No access matrix is configured to control access for. Ensure that the application settings are configured properly.", - NO_CLIENT_ID: "No clientId provided!", - INVALID_CLIENT_ID: "Invalid clientId!", - NO_TENANT_INFO: "No tenant info provided!", - INVALID_TENANT_INFO: "Invalid tenant info!", - NO_CLIENT_CREDENTIAL: "No client credential provided!", - NO_REDIRECT_URI: "No redirect URI provided!", - NO_UNAUTHORIZED_ROUTE: "No unauthorized route provided!", -}; -/** - * Default logger options - */ -const DEFAULT_LOGGER_OPTIONS = { - loggerCallback: (_logLevel, message, containsPii) => { - if (containsPii) { - return; - } - // eslint-disable-next-line no-console - console.info(message); - }, - piiLoggingEnabled: false, - logLevel: LogLevel.Info, -}; -const EMPTY_STRING = ""; - -export { AccessControlConstants, AppStages, ConfigurationErrorMessages, DEFAULT_LOGGER_OPTIONS, EMPTY_STRING, ErrorMessages, OIDC_SCOPES }; -//# sourceMappingURL=Constants.esm.js.map diff --git a/Common/msal-node-wrapper/dist/utils/Constants.esm.js.map b/Common/msal-node-wrapper/dist/utils/Constants.esm.js.map deleted file mode 100644 index e6b95a4..0000000 --- a/Common/msal-node-wrapper/dist/utils/Constants.esm.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Constants.esm.js","sources":["../../src/utils/Constants.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;AAAA;;;AAGG;AAIH;;;AAGG;IACS,UAIX;AAJD,CAAA,UAAY,SAAS,EAAA;AACjB,IAAA,SAAA,CAAA,SAAA,CAAA,GAAA,SAAmB,CAAA;AACnB,IAAA,SAAA,CAAA,UAAA,CAAA,GAAA,UAAqB,CAAA;AACrB,IAAA,SAAA,CAAA,eAAA,CAAA,GAAA,eAA+B,CAAA;AACnC,CAAC,EAJW,SAAS,KAAT,SAAS,GAIpB,EAAA,CAAA,CAAA,CAAA;AAWY,MAAA,WAAW,GAAG,CAAC,GAAG,mBAAmB,EAAE,OAAO,EAAE;AAE7D;;AAEG;AACU,MAAA,sBAAsB,GAAG;AAClC,IAAA,MAAM,EAAE,QAAQ;AAChB,IAAA,KAAK,EAAE,OAAO;AACd,IAAA,WAAW,EAAE,aAAa;AAC1B,IAAA,aAAa,EAAE,gBAAgB;AAC/B,IAAA,eAAe,EAAE,iBAAiB;AAClC,IAAA,sBAAsB,EAAE,8CAA8C;AACtE,IAAA,mBAAmB,EAAE,gCAAgC;EACvD;AAUF;;AAEG;AACU,MAAA,aAAa,GAAG;AACzB,IAAA,aAAa,EAAE,eAAe;AAC9B,IAAA,aAAa,EAAE,eAAe;AAC9B,IAAA,0BAA0B,EAAE,oCAAoC;AAChE,IAAA,qBAAqB,EAAE,uBAAuB;AAC9C,IAAA,mBAAmB,EAAE,2DAA2D;AAChF,IAAA,oBAAoB,EAAE,sBAAsB;AAC5C,IAAA,wBAAwB,EAAE,0BAA0B;AACpD,IAAA,mBAAmB,EAAE,wBAAwB;AAC7C,IAAA,0BAA0B,EAAE,2CAA2C;AACvE,IAAA,eAAe,EAAE,gBAAgB;AACjC,IAAA,iBAAiB,EAAE,yBAAyB;AAC5C,IAAA,kBAAkB,EAAE,0BAA0B;AAC9C,IAAA,iBAAiB,EAAE,iCAAiC;AACpD,IAAA,eAAe,EAAE,iBAAiB;AAClC,IAAA,gBAAgB,EAAE,8BAA8B;AAChD,IAAA,gBAAgB,EAAE,8BAA8B;AAChD,IAAA,iBAAiB,EAAE,+BAA+B;AAClD,IAAA,iBAAiB,EAAE,+BAA+B;AAClD,IAAA,kBAAkB,EAAE,mCAAmC;AACvD,IAAA,cAAc,EAAE,8BAA8B;AAC9C,IAAA,iBAAiB,EAAE,mCAAmC;AACtD,IAAA,0BAA0B,EAAE,oCAAoC;AAChE,IAAA,wCAAwC,EAAE,0CAA0C;AACpF,IAAA,qBAAqB,EAAE,4DAA4D;AACnF,IAAA,kCAAkC,EAAE,8CAA8C;AAClF,IAAA,yBAAyB,EAAE,qCAAqC;AAChE,IAAA,4BAA4B,EAAE,0DAA0D;EAC1F;AAEF;;AAEG;AACU,MAAA,0BAA0B,GAAG;AACtC,IAAA,0BAA0B,EAAE,sGAAsG;AAClI,IAAA,gCAAgC,EAAE,2HAA2H;AAC7J,IAAA,2BAA2B,EAAE,qHAAqH;AAClJ,IAAA,YAAY,EAAE,uBAAuB;AACrC,IAAA,iBAAiB,EAAE,mBAAmB;AACtC,IAAA,cAAc,EAAE,0BAA0B;AAC1C,IAAA,mBAAmB,EAAE,sBAAsB;AAC3C,IAAA,oBAAoB,EAAE,gCAAgC;AACtD,IAAA,eAAe,EAAE,2BAA2B;AAC5C,IAAA,qBAAqB,EAAE,iCAAiC;EAC1D;AAiBF;;AAEG;AACU,MAAA,sBAAsB,GAAkB;IACjD,cAAc,EAAE,CAAC,SAAS,EAAE,OAAO,EAAE,WAAW,KAAI;AAChD,QAAA,IAAI,WAAW,EAAE;YACb,OAAO;AACV,SAAA;;AAED,QAAA,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;KACzB;AACD,IAAA,iBAAiB,EAAE,KAAK;IACxB,QAAQ,EAAE,QAAQ,CAAC,IAAI;EACzB;AAWK,MAAM,YAAY,GAAG;;;;"} \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/utils/Constants.js b/Common/msal-node-wrapper/dist/utils/Constants.js deleted file mode 100644 index 23a5bc1..0000000 --- a/Common/msal-node-wrapper/dist/utils/Constants.js +++ /dev/null @@ -1,104 +0,0 @@ -/*! msal-node-wrapper v1.0.0-beta 2023-06-25 */ -'use strict'; -'use strict'; - -var Constants = require('../node_modules/@azure/msal-common/dist/utils/Constants.js'); -var Logger = require('../node_modules/@azure/msal-common/dist/logger/Logger.js'); - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -/** - * Basic authentication stages used to determine - * appropriate action after redirect occurs - */ -exports.AppStages = void 0; -(function (AppStages) { - AppStages["SIGN_IN"] = "sign_in"; - AppStages["SIGN_OUT"] = "sign_out"; - AppStages["ACQUIRE_TOKEN"] = "acquire_token"; -})(exports.AppStages || (exports.AppStages = {})); -const OIDC_SCOPES = [...Constants.OIDC_DEFAULT_SCOPES, "email"]; -/** - * Constants used in access control scenarios - */ -const AccessControlConstants = { - GROUPS: "groups", - ROLES: "roles", - CLAIM_NAMES: "_claim_name", - CLAIM_SOURCES: "_claim_sources", - PAGINATION_LINK: "@odata.nextLink", - GRAPH_MEMBERS_ENDPOINT: "https://graph.microsoft.com/v1.0/me/memberOf", - GRAPH_MEMBER_SCOPES: "User.Read GroupMember.Read.All", -}; -/** - * Various error constants - */ -const ErrorMessages = { - NOT_PERMITTED: "Not permitted", - INVALID_TOKEN: "Invalid token", - CANNOT_DETERMINE_APP_STAGE: "Cannot determine application stage", - CANNOT_VALIDATE_TOKEN: "Cannot validate token", - CSRF_TOKEN_MISMATCH: "CSRF token in response does not match to original request", - INTERACTION_REQUIRED: "interaction_required", - TOKEN_ACQUISITION_FAILED: "Token acquisition failed", - TOKEN_RESPONSE_NULL: "Token response is null", - AUTH_CODE_URL_NOT_OBTAINED: "Authorization code url cannot be obtained", - TOKEN_NOT_FOUND: "No token found", - TOKEN_NOT_DECODED: "Token cannot be decoded", - TOKEN_NOT_VERIFIED: "Token cannot be verified", - KEYS_NOT_OBTAINED: "Signing keys cannot be obtained", - STATE_NOT_FOUND: "State not found", - USER_HAS_NO_ROLE: "User does not have any roles", - USER_NOT_IN_ROLE: "User does not have this role", - USER_HAS_NO_GROUP: "User does not have any groups", - USER_NOT_IN_GROUP: "User does not have this group", - METHOD_NOT_ALLOWED: "Method not allowed for this route", - RULE_NOT_FOUND: "No rule found for this route", - SESSION_NOT_FOUND: "No session found for this request", - KEY_VAULT_CONFIG_NOT_FOUND: "No coordinates found for Key Vault", - CANNOT_OBTAIN_CREDENTIALS_FROM_KEY_VAULT: "Cannot obtain credentials from Key Vault", - SESSION_KEY_NOT_FOUND: "No session key found in session. Cannot encrypt state data", - AUTH_CODE_REQUEST_OBJECT_NOT_FOUND: "No auth code request object found in session", - ID_TOKEN_CLAIMS_NOT_FOUND: "No id token claims found in session", - AUTH_CODE_RESPONSE_NOT_FOUND: "No authorization code found in the response from service", -}; -/** - * Various configuration error constants - */ -const ConfigurationErrorMessages = { - AUTH_ROUTES_NOT_CONFIGURED: "Authentication routes are not defined. Ensure that the application settings are configured properly.", - NO_PROTECTED_RESOURCE_CONFIGURED: "No protected resource is configured to acquire a token for. Ensure that the application settings are configured properly.", - NO_ACCESS_MATRIX_CONFIGURED: "No access matrix is configured to control access for. Ensure that the application settings are configured properly.", - NO_CLIENT_ID: "No clientId provided!", - INVALID_CLIENT_ID: "Invalid clientId!", - NO_TENANT_INFO: "No tenant info provided!", - INVALID_TENANT_INFO: "Invalid tenant info!", - NO_CLIENT_CREDENTIAL: "No client credential provided!", - NO_REDIRECT_URI: "No redirect URI provided!", - NO_UNAUTHORIZED_ROUTE: "No unauthorized route provided!", -}; -/** - * Default logger options - */ -const DEFAULT_LOGGER_OPTIONS = { - loggerCallback: (_logLevel, message, containsPii) => { - if (containsPii) { - return; - } - // eslint-disable-next-line no-console - console.info(message); - }, - piiLoggingEnabled: false, - logLevel: Logger.LogLevel.Info, -}; -const EMPTY_STRING = ""; - -exports.AccessControlConstants = AccessControlConstants; -exports.ConfigurationErrorMessages = ConfigurationErrorMessages; -exports.DEFAULT_LOGGER_OPTIONS = DEFAULT_LOGGER_OPTIONS; -exports.EMPTY_STRING = EMPTY_STRING; -exports.ErrorMessages = ErrorMessages; -exports.OIDC_SCOPES = OIDC_SCOPES; -//# sourceMappingURL=Constants.js.map diff --git a/Common/msal-node-wrapper/dist/utils/Constants.js.map b/Common/msal-node-wrapper/dist/utils/Constants.js.map deleted file mode 100644 index 36d0379..0000000 --- a/Common/msal-node-wrapper/dist/utils/Constants.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Constants.js","sources":["../../src/utils/Constants.ts"],"sourcesContent":[null],"names":["AppStages","OIDC_DEFAULT_SCOPES","LogLevel"],"mappings":";;;;;;;AAAA;;;AAGG;AAIH;;;AAGG;AACSA,2BAIX;AAJD,CAAA,UAAY,SAAS,EAAA;AACjB,IAAA,SAAA,CAAA,SAAA,CAAA,GAAA,SAAmB,CAAA;AACnB,IAAA,SAAA,CAAA,UAAA,CAAA,GAAA,UAAqB,CAAA;AACrB,IAAA,SAAA,CAAA,eAAA,CAAA,GAAA,eAA+B,CAAA;AACnC,CAAC,EAJWA,iBAAS,KAATA,iBAAS,GAIpB,EAAA,CAAA,CAAA,CAAA;AAWY,MAAA,WAAW,GAAG,CAAC,GAAGC,6BAAmB,EAAE,OAAO,EAAE;AAE7D;;AAEG;AACU,MAAA,sBAAsB,GAAG;AAClC,IAAA,MAAM,EAAE,QAAQ;AAChB,IAAA,KAAK,EAAE,OAAO;AACd,IAAA,WAAW,EAAE,aAAa;AAC1B,IAAA,aAAa,EAAE,gBAAgB;AAC/B,IAAA,eAAe,EAAE,iBAAiB;AAClC,IAAA,sBAAsB,EAAE,8CAA8C;AACtE,IAAA,mBAAmB,EAAE,gCAAgC;EACvD;AAUF;;AAEG;AACU,MAAA,aAAa,GAAG;AACzB,IAAA,aAAa,EAAE,eAAe;AAC9B,IAAA,aAAa,EAAE,eAAe;AAC9B,IAAA,0BAA0B,EAAE,oCAAoC;AAChE,IAAA,qBAAqB,EAAE,uBAAuB;AAC9C,IAAA,mBAAmB,EAAE,2DAA2D;AAChF,IAAA,oBAAoB,EAAE,sBAAsB;AAC5C,IAAA,wBAAwB,EAAE,0BAA0B;AACpD,IAAA,mBAAmB,EAAE,wBAAwB;AAC7C,IAAA,0BAA0B,EAAE,2CAA2C;AACvE,IAAA,eAAe,EAAE,gBAAgB;AACjC,IAAA,iBAAiB,EAAE,yBAAyB;AAC5C,IAAA,kBAAkB,EAAE,0BAA0B;AAC9C,IAAA,iBAAiB,EAAE,iCAAiC;AACpD,IAAA,eAAe,EAAE,iBAAiB;AAClC,IAAA,gBAAgB,EAAE,8BAA8B;AAChD,IAAA,gBAAgB,EAAE,8BAA8B;AAChD,IAAA,iBAAiB,EAAE,+BAA+B;AAClD,IAAA,iBAAiB,EAAE,+BAA+B;AAClD,IAAA,kBAAkB,EAAE,mCAAmC;AACvD,IAAA,cAAc,EAAE,8BAA8B;AAC9C,IAAA,iBAAiB,EAAE,mCAAmC;AACtD,IAAA,0BAA0B,EAAE,oCAAoC;AAChE,IAAA,wCAAwC,EAAE,0CAA0C;AACpF,IAAA,qBAAqB,EAAE,4DAA4D;AACnF,IAAA,kCAAkC,EAAE,8CAA8C;AAClF,IAAA,yBAAyB,EAAE,qCAAqC;AAChE,IAAA,4BAA4B,EAAE,0DAA0D;EAC1F;AAEF;;AAEG;AACU,MAAA,0BAA0B,GAAG;AACtC,IAAA,0BAA0B,EAAE,sGAAsG;AAClI,IAAA,gCAAgC,EAAE,2HAA2H;AAC7J,IAAA,2BAA2B,EAAE,qHAAqH;AAClJ,IAAA,YAAY,EAAE,uBAAuB;AACrC,IAAA,iBAAiB,EAAE,mBAAmB;AACtC,IAAA,cAAc,EAAE,0BAA0B;AAC1C,IAAA,mBAAmB,EAAE,sBAAsB;AAC3C,IAAA,oBAAoB,EAAE,gCAAgC;AACtD,IAAA,eAAe,EAAE,2BAA2B;AAC5C,IAAA,qBAAqB,EAAE,iCAAiC;EAC1D;AAiBF;;AAEG;AACU,MAAA,sBAAsB,GAAkB;IACjD,cAAc,EAAE,CAAC,SAAS,EAAE,OAAO,EAAE,WAAW,KAAI;AAChD,QAAA,IAAI,WAAW,EAAE;YACb,OAAO;AACV,SAAA;;AAED,QAAA,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;KACzB;AACD,IAAA,iBAAiB,EAAE,KAAK;IACxB,QAAQ,EAAEC,eAAQ,CAAC,IAAI;EACzB;AAWK,MAAM,YAAY,GAAG;;;;;;;;;"} \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/utils/UrlUtils.d.ts b/Common/msal-node-wrapper/dist/utils/UrlUtils.d.ts deleted file mode 100644 index b0ab049..0000000 --- a/Common/msal-node-wrapper/dist/utils/UrlUtils.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { Request } from "express"; -export declare class UrlUtils { - /** - * Returns the absolute URL from a given request and path string - * @param {string} url: a given URL - * @param {string} protocol: protocol of the request - * @param {string} host: host of the request - * @returns {string} - */ - static ensureAbsoluteUrl: (url: string, protocol: string, host: string) => string; - /** - * Given a URL string, ensures that it is an absolute URL - * @param {Request} req: Express request object - * @param {string} url: a given URL - * @returns {string} - */ - static ensureAbsoluteUrlFromRequest: (req: Request, url?: string) => string; - /** - * Checks if the URL from a given request matches a given URL - * @param {Request} req: Express request object - * @param {string} url: a given URL - * @returns {boolean} - */ - static checkIfRequestsMatch: (req: Request, url: string) => boolean; - /** - * Returns the path segment from a given URL - * @param {string} url: a given URL - * @returns {string} - */ - static getPathFromUrl: (url: string) => string; - /** - * Ensures that the path contains a leading slash at the start - * @param {string} path: a given path - * @returns {string} - */ - static enforceLeadingSlash: (path: string) => string; - /** - * Ensures that the URL contains a trailing slash at the end - * @param {string} url: a given path - * @returns {string} - */ - static enforceTrailingSlash: (url: string) => string; -} -//# sourceMappingURL=UrlUtils.d.ts.map \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/utils/UrlUtils.d.ts.map b/Common/msal-node-wrapper/dist/utils/UrlUtils.d.ts.map deleted file mode 100644 index d20a82e..0000000 --- a/Common/msal-node-wrapper/dist/utils/UrlUtils.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UrlUtils.d.ts","sourceRoot":"","sources":["../../src/utils/UrlUtils.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAElC,qBAAa,QAAQ;IACjB;;;;;;OAMG;IACH,MAAM,CAAC,iBAAiB,QAAS,MAAM,YAAY,MAAM,QAAQ,MAAM,KAAG,MAAM,CAc9E;IAEF;;;;;OAKG;IACH,MAAM,CAAC,4BAA4B,QAAS,OAAO,QAAQ,MAAM,KAAG,MAAM,CAMxE;IAEF;;;;;OAKG;IACH,MAAM,CAAC,oBAAoB,QAAS,OAAO,OAAO,MAAM,KAAG,OAAO,CAEhE;IAEF;;;;OAIG;IACH,MAAM,CAAC,cAAc,QAAS,MAAM,KAAG,MAAM,CAG3C;IAEF;;;;OAIG;IACH,MAAM,CAAC,mBAAmB,SAAU,MAAM,KAAG,MAAM,CAEjD;IAEF;;;;OAIG;IACH,MAAM,CAAC,oBAAoB,QAAS,MAAM,KAAG,MAAM,CAEjD;CACL"} \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/utils/UrlUtils.esm.js b/Common/msal-node-wrapper/dist/utils/UrlUtils.esm.js deleted file mode 100644 index a1f8fb2..0000000 --- a/Common/msal-node-wrapper/dist/utils/UrlUtils.esm.js +++ /dev/null @@ -1,83 +0,0 @@ -/*! msal-node-wrapper v1.0.0-beta 2023-06-25 */ -'use strict'; -import { UrlString } from '../node_modules/@azure/msal-common/dist/url/UrlString.esm.js'; - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -class UrlUtils { -} -/** - * Returns the absolute URL from a given request and path string - * @param {string} url: a given URL - * @param {string} protocol: protocol of the request - * @param {string} host: host of the request - * @returns {string} - */ -UrlUtils.ensureAbsoluteUrl = (url, protocol, host) => { - const urlComponents = new UrlString(url).getUrlComponents(); - if (!urlComponents.Protocol) { - if (!urlComponents.HostNameAndPort && !url.startsWith("www")) { - if (!url.startsWith("/")) { - return protocol + "://" + host + "/" + url; - } - return protocol + "://" + host + url; - } - return protocol + "://" + url; - } - else { - return url; - } -}; -/** - * Given a URL string, ensures that it is an absolute URL - * @param {Request} req: Express request object - * @param {string} url: a given URL - * @returns {string} - */ -UrlUtils.ensureAbsoluteUrlFromRequest = (req, url) => { - if (url) { - return UrlUtils.ensureAbsoluteUrl(url, req.protocol, req.get("host") || req.hostname); - } - else { - return UrlUtils.ensureAbsoluteUrl(req.originalUrl, req.protocol, req.get("host") || req.hostname); - } -}; -/** - * Checks if the URL from a given request matches a given URL - * @param {Request} req: Express request object - * @param {string} url: a given URL - * @returns {boolean} - */ -UrlUtils.checkIfRequestsMatch = (req, url) => { - return UrlUtils.ensureAbsoluteUrlFromRequest(req) === UrlUtils.ensureAbsoluteUrlFromRequest(req, url); -}; -/** - * Returns the path segment from a given URL - * @param {string} url: a given URL - * @returns {string} - */ -UrlUtils.getPathFromUrl = (url) => { - const urlComponents = new UrlString(url).getUrlComponents(); - return `/${urlComponents.PathSegments.join("/")}`; -}; -/** - * Ensures that the path contains a leading slash at the start - * @param {string} path: a given path - * @returns {string} - */ -UrlUtils.enforceLeadingSlash = (path) => { - return path.split("")[0] === "/" ? path : "/" + path; -}; -/** - * Ensures that the URL contains a trailing slash at the end - * @param {string} url: a given path - * @returns {string} - */ -UrlUtils.enforceTrailingSlash = (url) => { - return url.endsWith("/") ? url : url + "/"; -}; - -export { UrlUtils }; -//# sourceMappingURL=UrlUtils.esm.js.map diff --git a/Common/msal-node-wrapper/dist/utils/UrlUtils.esm.js.map b/Common/msal-node-wrapper/dist/utils/UrlUtils.esm.js.map deleted file mode 100644 index 24b61e1..0000000 --- a/Common/msal-node-wrapper/dist/utils/UrlUtils.esm.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UrlUtils.esm.js","sources":["../../src/utils/UrlUtils.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAAA;;;AAGG;MAKU,QAAQ,CAAA;;AACjB;;;;;;AAMG;AACI,QAAiB,CAAA,iBAAA,GAAG,CAAC,GAAW,EAAE,QAAgB,EAAE,IAAY,KAAY;IAC/E,MAAM,aAAa,GAAS,IAAI,SAAS,CAAC,GAAG,CAAC,CAAC,gBAAgB,EAAE,CAAC;AAElE,IAAA,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE;AACzB,QAAA,IAAI,CAAC,aAAa,CAAC,eAAe,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE;AAC1D,YAAA,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE;gBACtB,OAAO,QAAQ,GAAG,KAAK,GAAG,IAAI,GAAG,GAAG,GAAG,GAAG,CAAC;AAC9C,aAAA;AACD,YAAA,OAAO,QAAQ,GAAG,KAAK,GAAG,IAAI,GAAG,GAAG,CAAC;AACxC,SAAA;AACD,QAAA,OAAO,QAAQ,GAAG,KAAK,GAAG,GAAG,CAAC;AACjC,KAAA;AAAM,SAAA;AACH,QAAA,OAAO,GAAG,CAAC;AACd,KAAA;AACL,CAAC,CAAC;AAEF;;;;;AAKG;AACI,QAAA,CAAA,4BAA4B,GAAG,CAAC,GAAY,EAAE,GAAY,KAAY;AACzE,IAAA,IAAI,GAAG,EAAE;QACL,OAAO,QAAQ,CAAC,iBAAiB,CAAC,GAAG,EAAE,GAAG,CAAC,QAAQ,EAAE,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,GAAG,CAAC,QAAQ,CAAC,CAAC;AACzF,KAAA;AAAM,SAAA;QACH,OAAO,QAAQ,CAAC,iBAAiB,CAAC,GAAG,CAAC,WAAW,EAAE,GAAG,CAAC,QAAQ,EAAE,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,GAAG,CAAC,QAAQ,CAAC,CAAC;AACrG,KAAA;AACL,CAAC,CAAC;AAEF;;;;;AAKG;AACI,QAAA,CAAA,oBAAoB,GAAG,CAAC,GAAY,EAAE,GAAW,KAAa;AACjE,IAAA,OAAO,QAAQ,CAAC,4BAA4B,CAAC,GAAG,CAAC,KAAK,QAAQ,CAAC,4BAA4B,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;AAC1G,CAAC,CAAC;AAEF;;;;AAIG;AACI,QAAA,CAAA,cAAc,GAAG,CAAC,GAAW,KAAY;IAC5C,MAAM,aAAa,GAAS,IAAI,SAAS,CAAC,GAAG,CAAC,CAAC,gBAAgB,EAAE,CAAC;IAClE,OAAO,CAAA,CAAA,EAAI,aAAa,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA,CAAE,CAAC;AACtD,CAAC,CAAC;AAEF;;;;AAIG;AACI,QAAA,CAAA,mBAAmB,GAAG,CAAC,IAAY,KAAY;IAClD,OAAO,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,GAAG,IAAI,GAAG,GAAG,GAAG,IAAI,CAAC;AACzD,CAAC,CAAC;AAEF;;;;AAIG;AACI,QAAA,CAAA,oBAAoB,GAAG,CAAC,GAAW,KAAY;AAClD,IAAA,OAAO,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AAC/C,CAAC;;;;"} \ No newline at end of file diff --git a/Common/msal-node-wrapper/dist/utils/UrlUtils.js b/Common/msal-node-wrapper/dist/utils/UrlUtils.js deleted file mode 100644 index ddba83c..0000000 --- a/Common/msal-node-wrapper/dist/utils/UrlUtils.js +++ /dev/null @@ -1,85 +0,0 @@ -/*! msal-node-wrapper v1.0.0-beta 2023-06-25 */ -'use strict'; -'use strict'; - -var UrlString = require('../node_modules/@azure/msal-common/dist/url/UrlString.js'); - -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -class UrlUtils { -} -/** - * Returns the absolute URL from a given request and path string - * @param {string} url: a given URL - * @param {string} protocol: protocol of the request - * @param {string} host: host of the request - * @returns {string} - */ -UrlUtils.ensureAbsoluteUrl = (url, protocol, host) => { - const urlComponents = new UrlString.UrlString(url).getUrlComponents(); - if (!urlComponents.Protocol) { - if (!urlComponents.HostNameAndPort && !url.startsWith("www")) { - if (!url.startsWith("/")) { - return protocol + "://" + host + "/" + url; - } - return protocol + "://" + host + url; - } - return protocol + "://" + url; - } - else { - return url; - } -}; -/** - * Given a URL string, ensures that it is an absolute URL - * @param {Request} req: Express request object - * @param {string} url: a given URL - * @returns {string} - */ -UrlUtils.ensureAbsoluteUrlFromRequest = (req, url) => { - if (url) { - return UrlUtils.ensureAbsoluteUrl(url, req.protocol, req.get("host") || req.hostname); - } - else { - return UrlUtils.ensureAbsoluteUrl(req.originalUrl, req.protocol, req.get("host") || req.hostname); - } -}; -/** - * Checks if the URL from a given request matches a given URL - * @param {Request} req: Express request object - * @param {string} url: a given URL - * @returns {boolean} - */ -UrlUtils.checkIfRequestsMatch = (req, url) => { - return UrlUtils.ensureAbsoluteUrlFromRequest(req) === UrlUtils.ensureAbsoluteUrlFromRequest(req, url); -}; -/** - * Returns the path segment from a given URL - * @param {string} url: a given URL - * @returns {string} - */ -UrlUtils.getPathFromUrl = (url) => { - const urlComponents = new UrlString.UrlString(url).getUrlComponents(); - return `/${urlComponents.PathSegments.join("/")}`; -}; -/** - * Ensures that the path contains a leading slash at the start - * @param {string} path: a given path - * @returns {string} - */ -UrlUtils.enforceLeadingSlash = (path) => { - return path.split("")[0] === "/" ? path : "/" + path; -}; -/** - * Ensures that the URL contains a trailing slash at the end - * @param {string} url: a given path - * @returns {string} - */ -UrlUtils.enforceTrailingSlash = (url) => { - return url.endsWith("/") ? url : url + "/"; -}; - -exports.UrlUtils = UrlUtils; -//# sourceMappingURL=UrlUtils.js.map diff --git a/Common/msal-node-wrapper/dist/utils/UrlUtils.js.map b/Common/msal-node-wrapper/dist/utils/UrlUtils.js.map deleted file mode 100644 index a326221..0000000 --- a/Common/msal-node-wrapper/dist/utils/UrlUtils.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UrlUtils.js","sources":["../../src/utils/UrlUtils.ts"],"sourcesContent":[null],"names":["UrlString"],"mappings":";;;;;;AAAA;;;AAGG;MAKU,QAAQ,CAAA;;AACjB;;;;;;AAMG;AACI,QAAiB,CAAA,iBAAA,GAAG,CAAC,GAAW,EAAE,QAAgB,EAAE,IAAY,KAAY;IAC/E,MAAM,aAAa,GAAS,IAAIA,mBAAS,CAAC,GAAG,CAAC,CAAC,gBAAgB,EAAE,CAAC;AAElE,IAAA,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE;AACzB,QAAA,IAAI,CAAC,aAAa,CAAC,eAAe,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE;AAC1D,YAAA,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE;gBACtB,OAAO,QAAQ,GAAG,KAAK,GAAG,IAAI,GAAG,GAAG,GAAG,GAAG,CAAC;AAC9C,aAAA;AACD,YAAA,OAAO,QAAQ,GAAG,KAAK,GAAG,IAAI,GAAG,GAAG,CAAC;AACxC,SAAA;AACD,QAAA,OAAO,QAAQ,GAAG,KAAK,GAAG,GAAG,CAAC;AACjC,KAAA;AAAM,SAAA;AACH,QAAA,OAAO,GAAG,CAAC;AACd,KAAA;AACL,CAAC,CAAC;AAEF;;;;;AAKG;AACI,QAAA,CAAA,4BAA4B,GAAG,CAAC,GAAY,EAAE,GAAY,KAAY;AACzE,IAAA,IAAI,GAAG,EAAE;QACL,OAAO,QAAQ,CAAC,iBAAiB,CAAC,GAAG,EAAE,GAAG,CAAC,QAAQ,EAAE,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,GAAG,CAAC,QAAQ,CAAC,CAAC;AACzF,KAAA;AAAM,SAAA;QACH,OAAO,QAAQ,CAAC,iBAAiB,CAAC,GAAG,CAAC,WAAW,EAAE,GAAG,CAAC,QAAQ,EAAE,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,GAAG,CAAC,QAAQ,CAAC,CAAC;AACrG,KAAA;AACL,CAAC,CAAC;AAEF;;;;;AAKG;AACI,QAAA,CAAA,oBAAoB,GAAG,CAAC,GAAY,EAAE,GAAW,KAAa;AACjE,IAAA,OAAO,QAAQ,CAAC,4BAA4B,CAAC,GAAG,CAAC,KAAK,QAAQ,CAAC,4BAA4B,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;AAC1G,CAAC,CAAC;AAEF;;;;AAIG;AACI,QAAA,CAAA,cAAc,GAAG,CAAC,GAAW,KAAY;IAC5C,MAAM,aAAa,GAAS,IAAIA,mBAAS,CAAC,GAAG,CAAC,CAAC,gBAAgB,EAAE,CAAC;IAClE,OAAO,CAAA,CAAA,EAAI,aAAa,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA,CAAE,CAAC;AACtD,CAAC,CAAC;AAEF;;;;AAIG;AACI,QAAA,CAAA,mBAAmB,GAAG,CAAC,IAAY,KAAY;IAClD,OAAO,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,GAAG,IAAI,GAAG,GAAG,GAAG,IAAI,CAAC;AACzD,CAAC,CAAC;AAEF;;;;AAIG;AACI,QAAA,CAAA,oBAAoB,GAAG,CAAC,GAAW,KAAY;AAClD,IAAA,OAAO,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AAC/C,CAAC;;;;"} \ No newline at end of file From a6b05c5ce172640472a002b8deec35efcc00fbef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Do=C4=9Fan=20Eri=C5=9Fen?= Date: Mon, 26 Jun 2023 23:32:35 -0700 Subject: [PATCH 07/18] update wrapper docs --- Common/msal-node-wrapper/README.md | 123 ++++++------ Common/msal-node-wrapper/dist/index.d.ts | 24 --- Common/msal-node-wrapper/package-lock.json | 167 ++++++++-------- Common/msal-node-wrapper/src/index.ts | 11 +- .../src/middleware/context/AuthContext.ts | 2 +- docs/assets/highlight.css | 7 - docs/assets/search.js | 2 +- docs/classes/AccessDeniedError.html | 151 +++++++++++++++ docs/classes/AuthContext.html | 181 ++++++++++++++++++ docs/classes/InteractionRequiredError.html | 97 ++++++++++ docs/classes/WebAppAuthProvider.html | 22 +-- docs/index.html | 39 ++-- docs/modules.html | 10 +- docs/types/AppState.html | 8 +- docs/types/AuthConfig.html | 8 +- docs/types/AuthRoutes.html | 8 +- docs/types/AuthenticateMiddlewareOptions.html | 8 +- docs/types/IdTokenClaims.html | 8 +- docs/types/LoginOptions.html | 8 +- docs/types/LogoutOptions.html | 8 +- docs/types/ProtectedResourceParams.html | 8 +- docs/types/ProtectedResourcesMap.html | 8 +- docs/types/RequestContext.html | 70 +++++++ docs/types/RouteGuardOptions.html | 8 +- docs/types/TokenRequestOptions.html | 8 +- docs/types/WebAppAuthConfig.html | 8 +- docs/variables/packageVersion.html | 8 +- 27 files changed, 775 insertions(+), 235 deletions(-) delete mode 100644 Common/msal-node-wrapper/dist/index.d.ts create mode 100644 docs/classes/AccessDeniedError.html create mode 100644 docs/classes/AuthContext.html create mode 100644 docs/classes/InteractionRequiredError.html create mode 100644 docs/types/RequestContext.html diff --git a/Common/msal-node-wrapper/README.md b/Common/msal-node-wrapper/README.md index 02f6446..f3fdcfc 100644 --- a/Common/msal-node-wrapper/README.md +++ b/Common/msal-node-wrapper/README.md @@ -1,4 +1,4 @@ -# msal-node-wrapper +# MSAL Node wrapper for Express.js This project illustrates a simple wrapper around the [ConfidentialClientApplication](https://azuread.github.io/microsoft-authentication-library-for-js/ref/classes/_azure_msal_node.confidentialclientapplication.html) class of the [Microsoft Authentication Library for Node.js](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-node#microsoft-authentication-library-for-node-msal-node) (MSAL Node), in order to streamline routine authentication tasks, such as login, logout and token acquisition, as well as securing routes and controlling access. This can be used in web apps built with Express.js, or frameworks that are based on Express.js. @@ -29,7 +29,7 @@ or download and extract the repository *.zip* file. ```console git clone https://github.com/Azure-Samples/ms-identity-javascript-nodejs-tutorial.git - cd ms-identity-javascript-nodejs-tutorial/shared/msal-node-wrapper + cd ms-identity-javascript-nodejs-tutorial/Common/msal-node-wrapper npm install npm run build ``` @@ -41,22 +41,28 @@ or download and extract the repository *.zip* file. 1. Initialize the wrapper by providing a configuration object. The object looks like the follows: ```javascript +const { WebAppAuthProvider } = require('msal-node-wrapper'); + const authConfig = { - authOptions: { + auth: { authority: "https://login.microsoftonline.com/Enter_the_Tenant_Info_Here", clientId: "Enter_the_Application_Id_Here", - clientSecret: "Enter_the_Client_Secret_Here", + clientSecret: "Enter_the_Client_Secret_Here", // use certificates instead for enhanced security redirectUri: "/redirect", } }; -// initialize the wrapper -const authProvider = await WebAppAuthProvider.initialize(authConfig); +try { + // initialize the wrapper + const authProvider = await WebAppAuthProvider.initialize(authConfig); +} catch (error) { + console.log(error) +} ``` ### Integration with Express.js -Import the package and instantiate [MsalWebAppAuthClient](https://azure-samples.github.io/ms-identity-javascript-nodejs-tutorial/classes/msalwebappauthclient.html) class, via the *WebAppAuthClientBuilder*, which exposes the middleware you can use in your routes. The constructor takes the settings object and an (optional) persistent cache: +Import the package and initialize the [WebAppAuthProvider](https://azure-samples.github.io/ms-identity-javascript-nodejs-tutorial/classes/msalwebappauthclient.html). The [initialize()]() method takes a configuration object. ```javascript const express = require('express'); @@ -89,25 +95,29 @@ async function main() { app.use(express.urlencoded({ extended: false })); app.use(express.json()); - // initialize the wrapper - const authProvider = await WebAppAuthProvider.initialize(authConfig); - - app.use(authProvider.authenticate({ - protectAllRoutes: true, - acquireTokenForResources: { - "graph.microsoft.com": { - scopes: ["User.Read"], - routes: ["/profile"] - }, - } - })); - - // pass the instance to your routers - app.use(mainRouter); - - app.use(authProvider.interactionErrorHandler()); - - app.listen(SERVER_PORT, () => console.log(`Msal Node Auth Code Sample app listening on port ${SERVER_PORT}!`)); + try { + // initialize the wrapper + const authProvider = await WebAppAuthProvider.initialize(authConfig); + + app.use(authProvider.authenticate({ + protectAllRoutes: true, // force user to authenticate for all routes + acquireTokenForResources: { // acquire an access token for this resource + "graph.microsoft.com": { // you can specify the resource name as you like + scopes: ["User.Read"], + routes: ["/profile"] // triggers when + }, + } + })); + + app.use(mainRouter); + + app.use(authProvider.interactionErrorHandler()); // this middleware handles interaction required errors + + app.listen(SERVER_PORT, () => console.log(`Msal Node Auth Code Sample app listening on port ${SERVER_PORT}!`)); + } catch (error) { + console.log(error); + process.exit(1); + } } main(); @@ -123,7 +133,7 @@ You can access the current authentication context via `req.authContext` variable #### Authentication -Add [login()]() and [logout()]() middleware to routes that you want to trigger a login/logout: +Add [login()]() and [logout()]() middleware to routes that you want to trigger a login/logout with Azure AD: ```javascript app.get( @@ -136,14 +146,6 @@ app.get( ); ``` -Alternatively, you can require authentication for all routes in your application using the authenticate() middleware: - -```javascript - app.use(authProvider.authenticate({ - protectAllRoutes: true, - })); -``` - ```javascript app.get( '/signout', @@ -155,9 +157,17 @@ app.get( ); ``` +Alternatively, you can require authentication for all routes in your application using the [authenticate()](https://azure-samples.github.io/ms-identity-javascript-nodejs-tutorial/classes/WebAppAuthProvider.html#authenticate) middleware: + +```javascript + app.use(authProvider.authenticate({ + protectAllRoutes: true, + })); +``` + #### Securing routes -Simply add the [isAuthenticated()](https://azure-samples.github.io/ms-identity-javascript-nodejs-tutorial/classes/msalwebappauthclient.html#isauthenticated) middleware before the controller that serves the page you would like to secure: +Simply add the [guard()](https://azure-samples.github.io/ms-identity-javascript-nodejs-tutorial/classes/WebAppAuthProvider.html#guard) middleware before the controller that serves the page you would like to secure: ```javascript app.get('/id', @@ -175,46 +185,29 @@ Simply add the [isAuthenticated()](https://azure-samples.github.io/ms-identity-j #### Acquiring tokens -[acquireToken()]() can be used before middleware that calls a web API. The access token will be available via +[acquireToken()]() can be used in controllers to ```javascript - router.get('/profile', - msid.isAuthenticated(), - msid.getToken({ - resource: { - endpoint: "https://graph.microsoft.com/v1.0/me", - scopes: [ "User.Read" ] - } - }), - async(req, res, next) => { - try { - // use axios or a similar alternative - const response = await axios.default.get("https://graph.microsoft.com/v1.0/me", { - headers: { - Authorization: `Bearer ${req.session["graphAPI"].accessToken}` - } - }); - - res.render('profile', { isAuthenticated: req.session.isAuthenticated, profile: response.data }); - } catch (error) { - console.log(error); - next(error); - } - } - ); // get token for this route to call web API + +``` + +If you have configured the [authenticate()](https://azure-samples.github.io/ms-identity-javascript-nodejs-tutorial/classes/WebAppAuthProvider.html#authenticate) middelware before, you can + +```javascript + ``` #### Controlling access -Use [guard()]() middleware to control access for Azure AD App Roles and/or Security Groups: +Use the [guard()](https://azure-samples.github.io/ms-identity-javascript-nodejs-tutorial/classes/WebAppAuthProvider.html#guard) middleware to control access for a certain claim or claims in the user's ID token. ```javascript app.get( '/todolist', authProvider.guard({ - forceLogin: true, + forceLogin: true, // ensure that the user is authenticated before accessing this route idTokenClaims: { - roles: ["TaskUser", "TaskAdmin"], + roles: ["TaskUser", "TaskAdmin"], // grant access to the route only if user has one of these claims }, }), ); @@ -222,7 +215,7 @@ Use [guard()]() middleware to control access for Azure AD App Roles and/or Secur app.get( '/dashboard', authProvider.guard({ - forceLogin: true, + forceLogin: false, // if user is not authenticated, an error will be thrown instead idTokenClaims: { roles: ["TaskAdmin"], }, diff --git a/Common/msal-node-wrapper/dist/index.d.ts b/Common/msal-node-wrapper/dist/index.d.ts deleted file mode 100644 index 8ec92e4..0000000 --- a/Common/msal-node-wrapper/dist/index.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { AccountInfo, AuthenticationResult, AuthorizationCodeRequest } from "@azure/msal-node"; -import { AuthContext } from "./middleware/context/AuthContext"; -declare module "express-session" { - interface SessionData { - account: AccountInfo; - isAuthenticated: boolean; - protectedResources: Record; - tokenRequestParams: AuthorizationCodeRequest; - tokenCache?: string; - } -} -declare global { - namespace Express { - interface Request { - authContext: AuthContext; - } - } -} -export { InteractionRequiredAuthError, NodeSystemOptions, AuthError, Logger, AccountInfo } from "@azure/msal-node"; -export { WebAppAuthProvider } from "./provider/WebAppAuthProvider"; -export { WebAppAuthConfig, AuthConfig, AuthRoutes, ProtectedResourceParams, ProtectedResourcesMap } from "./config/ConfigurationTypes"; -export { RouteGuardOptions, AuthenticateMiddlewareOptions, LoginOptions, LogoutOptions, TokenRequestOptions, AppState, IdTokenClaims } from "./middleware/MiddlewareOptions"; -export { packageVersion } from "./packageMetadata"; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/Common/msal-node-wrapper/package-lock.json b/Common/msal-node-wrapper/package-lock.json index dbcac4d..aca9129 100644 --- a/Common/msal-node-wrapper/package-lock.json +++ b/Common/msal-node-wrapper/package-lock.json @@ -709,9 +709,9 @@ } }, "node_modules/@eslint/js": { - "version": "8.42.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.42.0.tgz", - "integrity": "sha512-6SWlXpWU5AvId8Ac7zjzmIOqMOba/JWY8XZ4A7q7Gn1Vlfg/SFFIlrtHXt9nPn4op9ZPAkl91Jao+QQv3r/ukw==", + "version": "8.43.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.43.0.tgz", + "integrity": "sha512-s2UHCoiXfxMvmfzqoN+vrQ84ahUSYde9qNO1MdxmoEhyHWsfmwOpFlwYV+ePJEVc7gFnATGUi376WowX1N7tFg==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1346,9 +1346,9 @@ } }, "node_modules/@sinonjs/fake-timers": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.2.0.tgz", - "integrity": "sha512-OPwQlEdg40HAj5KNF8WW6q2KG4Z+cBCZb3m4ninfTZKaBmbIJodviQsDBoYMPHkOyJJMHnOJo5j2+LKDOhOACg==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", + "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", "dev": true, "dependencies": { "@sinonjs/commons": "^3.0.0" @@ -1488,6 +1488,12 @@ "@types/node": "*" } }, + "node_modules/@types/http-errors": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.1.tgz", + "integrity": "sha512-/K3ds8TRAfBvi5vfjuz8y6+GiAYBZ0x4tXv1Av6CWBWn0IlADc+ZX9pMq7oU0fNQPnBwIZl3rmeLp6SBApbxSQ==", + "dev": true + }, "node_modules/@types/istanbul-lib-coverage": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", @@ -1587,11 +1593,12 @@ } }, "node_modules/@types/serve-static": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.1.tgz", - "integrity": "sha512-NUo5XNiAdULrJENtJXZZ3fHtfMolzZwczzBbnAeBbqBwG+LaG6YaJtuwzwGSQZ2wsCrxjEhNNjAkKigy3n8teQ==", + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.2.tgz", + "integrity": "sha512-J2LqtvFYCzaj8pVYKw8klQXrLLk7TBZmQ4ShlcdkELFKGwGMfevMLneMMRkMgZxotOD9wg497LpC7O8PcvAmfw==", "dev": true, "dependencies": { + "@types/http-errors": "*", "@types/mime": "*", "@types/node": "*" } @@ -1633,15 +1640,15 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.59.9", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.9.tgz", - "integrity": "sha512-4uQIBq1ffXd2YvF7MAvehWKW3zVv/w+mSfRAu+8cKbfj3nwzyqJLNcZJpQ/WZ1HLbJDiowwmQ6NO+63nCA+fqA==", + "version": "5.60.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.60.1.tgz", + "integrity": "sha512-KSWsVvsJsLJv3c4e73y/Bzt7OpqMCADUO846bHcuWYSYM19bldbAeDv7dYyV0jwkbMfJ2XdlzwjhXtuD7OY6bw==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.4.0", - "@typescript-eslint/scope-manager": "5.59.9", - "@typescript-eslint/type-utils": "5.59.9", - "@typescript-eslint/utils": "5.59.9", + "@typescript-eslint/scope-manager": "5.60.1", + "@typescript-eslint/type-utils": "5.60.1", + "@typescript-eslint/utils": "5.60.1", "debug": "^4.3.4", "grapheme-splitter": "^1.0.4", "ignore": "^5.2.0", @@ -1667,14 +1674,14 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "5.59.9", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.59.9.tgz", - "integrity": "sha512-FsPkRvBtcLQ/eVK1ivDiNYBjn3TGJdXy2fhXX+rc7czWl4ARwnpArwbihSOHI2Peg9WbtGHrbThfBUkZZGTtvQ==", + "version": "5.60.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.60.1.tgz", + "integrity": "sha512-pHWlc3alg2oSMGwsU/Is8hbm3XFbcrb6P5wIxcQW9NsYBfnrubl/GhVVD/Jm/t8HXhA2WncoIRfBtnCgRGV96Q==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.59.9", - "@typescript-eslint/types": "5.59.9", - "@typescript-eslint/typescript-estree": "5.59.9", + "@typescript-eslint/scope-manager": "5.60.1", + "@typescript-eslint/types": "5.60.1", + "@typescript-eslint/typescript-estree": "5.60.1", "debug": "^4.3.4" }, "engines": { @@ -1694,13 +1701,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "5.59.9", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.59.9.tgz", - "integrity": "sha512-8RA+E+w78z1+2dzvK/tGZ2cpGigBZ58VMEHDZtpE1v+LLjzrYGc8mMaTONSxKyEkz3IuXFM0IqYiGHlCsmlZxQ==", + "version": "5.60.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.60.1.tgz", + "integrity": "sha512-Dn/LnN7fEoRD+KspEOV0xDMynEmR3iSHdgNsarlXNLGGtcUok8L4N71dxUgt3YvlO8si7E+BJ5Fe3wb5yUw7DQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.59.9", - "@typescript-eslint/visitor-keys": "5.59.9" + "@typescript-eslint/types": "5.60.1", + "@typescript-eslint/visitor-keys": "5.60.1" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1711,13 +1718,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "5.59.9", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.59.9.tgz", - "integrity": "sha512-ksEsT0/mEHg9e3qZu98AlSrONAQtrSTljL3ow9CGej8eRo7pe+yaC/mvTjptp23Xo/xIf2mLZKC6KPv4Sji26Q==", + "version": "5.60.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.60.1.tgz", + "integrity": "sha512-vN6UztYqIu05nu7JqwQGzQKUJctzs3/Hg7E2Yx8rz9J+4LgtIDFWjjl1gm3pycH0P3mHAcEUBd23LVgfrsTR8A==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "5.59.9", - "@typescript-eslint/utils": "5.59.9", + "@typescript-eslint/typescript-estree": "5.60.1", + "@typescript-eslint/utils": "5.60.1", "debug": "^4.3.4", "tsutils": "^3.21.0" }, @@ -1738,9 +1745,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "5.59.9", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.59.9.tgz", - "integrity": "sha512-uW8H5NRgTVneSVTfiCVffBb8AbwWSKg7qcA4Ot3JI3MPCJGsB4Db4BhvAODIIYE5mNj7Q+VJkK7JxmRhk2Lyjw==", + "version": "5.60.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.60.1.tgz", + "integrity": "sha512-zDcDx5fccU8BA0IDZc71bAtYIcG9PowaOwaD8rjYbqwK7dpe/UMQl3inJ4UtUK42nOCT41jTSCwg76E62JpMcg==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1751,13 +1758,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.59.9", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.9.tgz", - "integrity": "sha512-pmM0/VQ7kUhd1QyIxgS+aRvMgw+ZljB3eDb+jYyp6d2bC0mQWLzUDF+DLwCTkQ3tlNyVsvZRXjFyV0LkU/aXjA==", + "version": "5.60.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.60.1.tgz", + "integrity": "sha512-hkX70J9+2M2ZT6fhti5Q2FoU9zb+GeZK2SLP1WZlvUDqdMbEKhexZODD1WodNRyO8eS+4nScvT0dts8IdaBzfw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.59.9", - "@typescript-eslint/visitor-keys": "5.59.9", + "@typescript-eslint/types": "5.60.1", + "@typescript-eslint/visitor-keys": "5.60.1", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -1778,17 +1785,17 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "5.59.9", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.59.9.tgz", - "integrity": "sha512-1PuMYsju/38I5Ggblaeb98TOoUvjhRvLpLa1DoTOFaLWqaXl/1iQ1eGurTXgBY58NUdtfTXKP5xBq7q9NDaLKg==", + "version": "5.60.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.60.1.tgz", + "integrity": "sha512-tiJ7FFdFQOWssFa3gqb94Ilexyw0JVxj6vBzaSpfN/8IhoKkDuSAenUKvsSHw2A/TMpJb26izIszTXaqygkvpQ==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@types/json-schema": "^7.0.9", "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.59.9", - "@typescript-eslint/types": "5.59.9", - "@typescript-eslint/typescript-estree": "5.59.9", + "@typescript-eslint/scope-manager": "5.60.1", + "@typescript-eslint/types": "5.60.1", + "@typescript-eslint/typescript-estree": "5.60.1", "eslint-scope": "^5.1.1", "semver": "^7.3.7" }, @@ -1804,12 +1811,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.59.9", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.9.tgz", - "integrity": "sha512-bT7s0td97KMaLwpEBckbzj/YohnvXtqbe2XgqNvTl6RJVakY5mvENOTPvw5u66nljfZxthESpDozs86U+oLY8Q==", + "version": "5.60.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.60.1.tgz", + "integrity": "sha512-xEYIxKcultP6E/RMKqube11pGjXH1DCo60mQoWhVYyKfLkwbIVVjYxmOenNMxILx0TjCujPTjjnTIVzm09TXIw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.59.9", + "@typescript-eslint/types": "5.60.1", "eslint-visitor-keys": "^3.3.0" }, "engines": { @@ -1833,9 +1840,9 @@ } }, "node_modules/acorn": { - "version": "8.8.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", - "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.9.0.tgz", + "integrity": "sha512-jaVNAFBHNLXspO543WnNNPZFRtavh3skAkITqD0/2aeMkKZTN+254PyhwxFYrk3vQ1xfY+2wbesJMs/JC8/PwQ==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -2215,9 +2222,9 @@ } }, "node_modules/browserslist": { - "version": "4.21.7", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.7.tgz", - "integrity": "sha512-BauCXrQ7I2ftSqd2mvKHGo85XR0u7Ru3C/Hxsy/0TkfCtjrmAbPdzLGasmoiBxplpDXlPvdjX9u7srIMfgasNA==", + "version": "4.21.9", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.9.tgz", + "integrity": "sha512-M0MFoZzbUrRU4KNfCrDLnvyE7gub+peetoTid3TBIqtunaDJyXlwhakT+/VkvSXcfIzFfK/nkCs4nmyTmxdNSg==", "dev": true, "funding": [ { @@ -2234,8 +2241,8 @@ } ], "dependencies": { - "caniuse-lite": "^1.0.30001489", - "electron-to-chromium": "^1.4.411", + "caniuse-lite": "^1.0.30001503", + "electron-to-chromium": "^1.4.431", "node-releases": "^2.0.12", "update-browserslist-db": "^1.0.11" }, @@ -2329,9 +2336,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001499", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001499.tgz", - "integrity": "sha512-IhoQqRrW6WiecFcfZgoJS1YLEN1/HR1vHP5WNgjCARRW7KUNToHHTX3FrwCM+y4zkRa48D9rE90WFYc2IWhDWQ==", + "version": "1.0.30001508", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001508.tgz", + "integrity": "sha512-sdQZOJdmt3GJs1UMNpCCCyeuS2IEGLXnHyAo9yIO5JJDjbjoVRij4M1qep6P6gFpptD1PqIYgzM+gwJbOi92mw==", "dev": true, "funding": [ { @@ -2677,9 +2684,9 @@ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" }, "node_modules/electron-to-chromium": { - "version": "1.4.427", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.427.tgz", - "integrity": "sha512-HK3r9l+Jm8dYAm1ctXEWIC+hV60zfcjS9UA5BDlYvnI5S7PU/yytjpvSrTNrSSRRkuu3tDyZhdkwIczh+0DWaw==", + "version": "1.4.441", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.441.tgz", + "integrity": "sha512-LlCgQ8zgYZPymf5H4aE9itwiIWH4YlCiv1HFLmmcBeFYi5E+3eaIFnjHzYtcFQbaKfAW+CqZ9pgxo33DZuoqPg==", "dev": true }, "node_modules/emittery": { @@ -2832,15 +2839,15 @@ } }, "node_modules/eslint": { - "version": "8.42.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.42.0.tgz", - "integrity": "sha512-ulg9Ms6E1WPf67PHaEY4/6E2tEn5/f7FXGzr3t9cBMugOmf1INYvuUwwh1aXQN4MfJ6a5K2iNwP3w4AColvI9A==", + "version": "8.43.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.43.0.tgz", + "integrity": "sha512-aaCpf2JqqKesMFGgmRPessmVKjcGXqdlAYLLC3THM8t5nBRZRQ+st5WM/hoJXkdioEXLLbXgclUpM0TXo5HX5Q==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.4.0", "@eslint/eslintrc": "^2.0.3", - "@eslint/js": "8.42.0", + "@eslint/js": "8.43.0", "@humanwhocodes/config-array": "^0.11.10", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", @@ -5951,9 +5958,9 @@ } }, "node_modules/pirates": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.5.tgz", - "integrity": "sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==", + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", + "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", "dev": true, "engines": { "node": ">= 6" @@ -6331,9 +6338,9 @@ } }, "node_modules/rollup": { - "version": "3.25.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.25.0.tgz", - "integrity": "sha512-FnJkNRst2jEZGw7f+v4hFo6UTzpDKrAKcHZWcEfm5/GJQ5CK7wgb4moNLNAe7npKUev7yQn1AY/YbZRIxOv6Qg==", + "version": "3.25.3", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.25.3.tgz", + "integrity": "sha512-ZT279hx8gszBj9uy5FfhoG4bZx8c+0A1sbqtr7Q3KNWIizpTdDEPZbV2xcbvHsnFp4MavCQYZyzApJ+virB8Yw==", "dev": true, "bin": { "rollup": "dist/bin/rollup" @@ -6528,9 +6535,9 @@ } }, "node_modules/shiki": { - "version": "0.14.2", - "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.14.2.tgz", - "integrity": "sha512-ltSZlSLOuSY0M0Y75KA+ieRaZ0Trf5Wl3gutE7jzLuIcWxLp5i/uEnLoQWNvgKXQ5OMpGkJnVMRLAuzjc0LJ2A==", + "version": "0.14.3", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.14.3.tgz", + "integrity": "sha512-U3S/a+b0KS+UkTyMjoNojvTgrBHjgp7L6ovhFVZsXmBGnVdQ4K4U9oK0z63w538S91ATngv1vXigHCSWOwnr+g==", "dev": true, "dependencies": { "ansi-sequence-parser": "^1.1.0", @@ -6559,13 +6566,13 @@ "dev": true }, "node_modules/sinon": { - "version": "15.1.0", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-15.1.0.tgz", - "integrity": "sha512-cS5FgpDdE9/zx7no8bxROHymSlPLZzq0ChbbLk1DrxBfc+eTeBK3y8nIL+nu/0QeYydhhbLIr7ecHJpywjQaoQ==", + "version": "15.2.0", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-15.2.0.tgz", + "integrity": "sha512-nPS85arNqwBXaIsFCkolHjGIkFo+Oxu9vbgmBJizLAhqe6P2o3Qmj3KCUoRkfhHtvgDhZdWD3risLHAUJ8npjw==", "dev": true, "dependencies": { "@sinonjs/commons": "^3.0.0", - "@sinonjs/fake-timers": "^10.2.0", + "@sinonjs/fake-timers": "^10.3.0", "@sinonjs/samsam": "^8.0.0", "diff": "^5.1.0", "nise": "^5.1.4", diff --git a/Common/msal-node-wrapper/src/index.ts b/Common/msal-node-wrapper/src/index.ts index c1a2587..e4bcc3c 100644 --- a/Common/msal-node-wrapper/src/index.ts +++ b/Common/msal-node-wrapper/src/index.ts @@ -30,17 +30,18 @@ export { NodeSystemOptions, AuthError, Logger, - AccountInfo + AccountInfo } from "@azure/msal-node"; export { WebAppAuthProvider } from "./provider/WebAppAuthProvider"; +export { AuthContext, RequestContext } from "./middleware/context/AuthContext"; export { WebAppAuthConfig, AuthConfig, AuthRoutes, ProtectedResourceParams, - ProtectedResourcesMap + ProtectedResourcesMap, } from "./config/ConfigurationTypes"; export { @@ -50,7 +51,11 @@ export { LogoutOptions, TokenRequestOptions, AppState, - IdTokenClaims + IdTokenClaims, } from "./middleware/MiddlewareOptions"; +export { AccessDeniedError } from "./error/AccessDeniedError"; + +export { InteractionRequiredError } from "./error/InteractionRequiredError"; + export { packageVersion } from "./packageMetadata"; diff --git a/Common/msal-node-wrapper/src/middleware/context/AuthContext.ts b/Common/msal-node-wrapper/src/middleware/context/AuthContext.ts index 19373d4..23953f7 100644 --- a/Common/msal-node-wrapper/src/middleware/context/AuthContext.ts +++ b/Common/msal-node-wrapper/src/middleware/context/AuthContext.ts @@ -12,7 +12,7 @@ import loginHandler from "../handlers/loginHandler"; import logoutHandler from "../handlers/logoutHandler"; import acquireTokenHandler from "../handlers/acquireTokenHandler"; -type RequestContext = { req: Request, res: Response, next: NextFunction }; +export type RequestContext = { req: Request, res: Response, next: NextFunction }; export class AuthContext { private provider: WebAppAuthProvider; diff --git a/docs/assets/highlight.css b/docs/assets/highlight.css index a618b64..10fc288 100644 --- a/docs/assets/highlight.css +++ b/docs/assets/highlight.css @@ -17,8 +17,6 @@ --dark-hl-7: #C586C0; --light-hl-8: #098658; --dark-hl-8: #B5CEA8; - --light-hl-9: #000000FF; - --dark-hl-9: #D4D4D4; --light-code-background: #FFFFFF; --dark-code-background: #1E1E1E; } @@ -33,7 +31,6 @@ --hl-6: var(--light-hl-6); --hl-7: var(--light-hl-7); --hl-8: var(--light-hl-8); - --hl-9: var(--light-hl-9); --code-background: var(--light-code-background); } } @@ -47,7 +44,6 @@ --hl-6: var(--dark-hl-6); --hl-7: var(--dark-hl-7); --hl-8: var(--dark-hl-8); - --hl-9: var(--dark-hl-9); --code-background: var(--dark-code-background); } } @@ -61,7 +57,6 @@ --hl-6: var(--light-hl-6); --hl-7: var(--light-hl-7); --hl-8: var(--light-hl-8); - --hl-9: var(--light-hl-9); --code-background: var(--light-code-background); } @@ -75,7 +70,6 @@ --hl-6: var(--dark-hl-6); --hl-7: var(--dark-hl-7); --hl-8: var(--dark-hl-8); - --hl-9: var(--dark-hl-9); --code-background: var(--dark-code-background); } @@ -88,5 +82,4 @@ .hl-6 { color: var(--hl-6); } .hl-7 { color: var(--hl-7); } .hl-8 { color: var(--hl-8); } -.hl-9 { color: var(--hl-9); } pre, code { background: var(--code-background); } diff --git a/docs/assets/search.js b/docs/assets/search.js index f54917c..a913d99 100644 --- a/docs/assets/search.js +++ b/docs/assets/search.js @@ -1 +1 @@ -window.searchData = JSON.parse("{\"kinds\":{\"32\":\"Variable\",\"128\":\"Class\",\"1024\":\"Property\",\"2048\":\"Method\",\"65536\":\"Type literal\",\"4194304\":\"Type alias\"},\"rows\":[{\"kind\":128,\"name\":\"WebAppAuthProvider\",\"url\":\"classes/WebAppAuthProvider.html\",\"classes\":\"tsd-kind-class\"},{\"kind\":2048,\"name\":\"initialize\",\"url\":\"classes/WebAppAuthProvider.html#initialize\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"WebAppAuthProvider\"},{\"kind\":1024,\"name\":\"webAppAuthConfig\",\"url\":\"classes/WebAppAuthProvider.html#webAppAuthConfig\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"WebAppAuthProvider\"},{\"kind\":2048,\"name\":\"authenticate\",\"url\":\"classes/WebAppAuthProvider.html#authenticate\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"WebAppAuthProvider\"},{\"kind\":2048,\"name\":\"guard\",\"url\":\"classes/WebAppAuthProvider.html#guard\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"WebAppAuthProvider\"},{\"kind\":2048,\"name\":\"interactionErrorHandler\",\"url\":\"classes/WebAppAuthProvider.html#interactionErrorHandler\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"WebAppAuthProvider\"},{\"kind\":2048,\"name\":\"getAuthConfig\",\"url\":\"classes/WebAppAuthProvider.html#getAuthConfig\",\"classes\":\"tsd-kind-method tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"WebAppAuthProvider\"},{\"kind\":2048,\"name\":\"getMsalConfig\",\"url\":\"classes/WebAppAuthProvider.html#getMsalConfig\",\"classes\":\"tsd-kind-method tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"WebAppAuthProvider\"},{\"kind\":2048,\"name\":\"getCryptoProvider\",\"url\":\"classes/WebAppAuthProvider.html#getCryptoProvider\",\"classes\":\"tsd-kind-method tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"WebAppAuthProvider\"},{\"kind\":2048,\"name\":\"getLogger\",\"url\":\"classes/WebAppAuthProvider.html#getLogger\",\"classes\":\"tsd-kind-method tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"WebAppAuthProvider\"},{\"kind\":2048,\"name\":\"getMsalClient\",\"url\":\"classes/WebAppAuthProvider.html#getMsalClient\",\"classes\":\"tsd-kind-method tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"WebAppAuthProvider\"},{\"kind\":4194304,\"name\":\"WebAppAuthConfig\",\"url\":\"types/WebAppAuthConfig.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"AuthConfig\",\"url\":\"types/AuthConfig.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"types/AuthConfig.html#__type\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-type-alias\",\"parent\":\"AuthConfig\"},{\"kind\":1024,\"name\":\"auth\",\"url\":\"types/AuthConfig.html#__type.auth\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"AuthConfig.__type\"},{\"kind\":1024,\"name\":\"system\",\"url\":\"types/AuthConfig.html#__type.system\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"AuthConfig.__type\"},{\"kind\":1024,\"name\":\"cache\",\"url\":\"types/AuthConfig.html#__type.cache\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"AuthConfig.__type\"},{\"kind\":4194304,\"name\":\"AuthRoutes\",\"url\":\"types/AuthRoutes.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"types/AuthRoutes.html#__type\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-type-alias\",\"parent\":\"AuthRoutes\"},{\"kind\":1024,\"name\":\"redirectUri\",\"url\":\"types/AuthRoutes.html#__type.redirectUri\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"AuthRoutes.__type\"},{\"kind\":1024,\"name\":\"frontChannelLogoutUri\",\"url\":\"types/AuthRoutes.html#__type.frontChannelLogoutUri\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"AuthRoutes.__type\"},{\"kind\":1024,\"name\":\"postLogoutRedirectUri\",\"url\":\"types/AuthRoutes.html#__type.postLogoutRedirectUri\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"AuthRoutes.__type\"},{\"kind\":4194304,\"name\":\"ProtectedResourceParams\",\"url\":\"types/ProtectedResourceParams.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"types/ProtectedResourceParams.html#__type\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-type-alias\",\"parent\":\"ProtectedResourceParams\"},{\"kind\":1024,\"name\":\"scopes\",\"url\":\"types/ProtectedResourceParams.html#__type.scopes\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"ProtectedResourceParams.__type\"},{\"kind\":1024,\"name\":\"routes\",\"url\":\"types/ProtectedResourceParams.html#__type.routes\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"ProtectedResourceParams.__type\"},{\"kind\":4194304,\"name\":\"ProtectedResourcesMap\",\"url\":\"types/ProtectedResourcesMap.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"RouteGuardOptions\",\"url\":\"types/RouteGuardOptions.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"types/RouteGuardOptions.html#__type\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-type-alias\",\"parent\":\"RouteGuardOptions\"},{\"kind\":1024,\"name\":\"forceLogin\",\"url\":\"types/RouteGuardOptions.html#__type.forceLogin\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"RouteGuardOptions.__type\"},{\"kind\":1024,\"name\":\"postLoginRedirectUri\",\"url\":\"types/RouteGuardOptions.html#__type.postLoginRedirectUri\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"RouteGuardOptions.__type\"},{\"kind\":1024,\"name\":\"postFailureRedirectUri\",\"url\":\"types/RouteGuardOptions.html#__type.postFailureRedirectUri\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"RouteGuardOptions.__type\"},{\"kind\":1024,\"name\":\"idTokenClaims\",\"url\":\"types/RouteGuardOptions.html#__type.idTokenClaims\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"RouteGuardOptions.__type\"},{\"kind\":4194304,\"name\":\"AuthenticateMiddlewareOptions\",\"url\":\"types/AuthenticateMiddlewareOptions.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"types/AuthenticateMiddlewareOptions.html#__type\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-type-alias\",\"parent\":\"AuthenticateMiddlewareOptions\"},{\"kind\":1024,\"name\":\"protectAllRoutes\",\"url\":\"types/AuthenticateMiddlewareOptions.html#__type.protectAllRoutes\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"AuthenticateMiddlewareOptions.__type\"},{\"kind\":1024,\"name\":\"acquireTokenForResources\",\"url\":\"types/AuthenticateMiddlewareOptions.html#__type.acquireTokenForResources\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"AuthenticateMiddlewareOptions.__type\"},{\"kind\":4194304,\"name\":\"LoginOptions\",\"url\":\"types/LoginOptions.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"LogoutOptions\",\"url\":\"types/LogoutOptions.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"TokenRequestOptions\",\"url\":\"types/TokenRequestOptions.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"AppState\",\"url\":\"types/AppState.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"types/AppState.html#__type\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-type-alias\",\"parent\":\"AppState\"},{\"kind\":1024,\"name\":\"redirectTo\",\"url\":\"types/AppState.html#__type.redirectTo\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"AppState.__type\"},{\"kind\":1024,\"name\":\"customState\",\"url\":\"types/AppState.html#__type.customState\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"AppState.__type\"},{\"kind\":4194304,\"name\":\"IdTokenClaims\",\"url\":\"types/IdTokenClaims.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":32,\"name\":\"packageVersion\",\"url\":\"variables/packageVersion.html\",\"classes\":\"tsd-kind-variable\"}],\"index\":{\"version\":\"2.3.9\",\"fields\":[\"name\",\"comment\"],\"fieldVectors\":[[\"name/0\",[0,34.447]],[\"comment/0\",[]],[\"name/1\",[1,34.447]],[\"comment/1\",[]],[\"name/2\",[2,29.339]],[\"comment/2\",[]],[\"name/3\",[3,34.447]],[\"comment/3\",[]],[\"name/4\",[4,34.447]],[\"comment/4\",[]],[\"name/5\",[5,34.447]],[\"comment/5\",[]],[\"name/6\",[6,34.447]],[\"comment/6\",[]],[\"name/7\",[7,34.447]],[\"comment/7\",[]],[\"name/8\",[8,34.447]],[\"comment/8\",[]],[\"name/9\",[9,34.447]],[\"comment/9\",[]],[\"name/10\",[10,34.447]],[\"comment/10\",[]],[\"name/11\",[2,29.339]],[\"comment/11\",[]],[\"name/12\",[11,34.447]],[\"comment/12\",[]],[\"name/13\",[12,19.783]],[\"comment/13\",[]],[\"name/14\",[13,34.447]],[\"comment/14\",[]],[\"name/15\",[14,34.447]],[\"comment/15\",[]],[\"name/16\",[15,34.447]],[\"comment/16\",[]],[\"name/17\",[16,34.447]],[\"comment/17\",[]],[\"name/18\",[12,19.783]],[\"comment/18\",[]],[\"name/19\",[17,34.447]],[\"comment/19\",[]],[\"name/20\",[18,34.447]],[\"comment/20\",[]],[\"name/21\",[19,34.447]],[\"comment/21\",[]],[\"name/22\",[20,34.447]],[\"comment/22\",[]],[\"name/23\",[12,19.783]],[\"comment/23\",[]],[\"name/24\",[21,34.447]],[\"comment/24\",[]],[\"name/25\",[22,34.447]],[\"comment/25\",[]],[\"name/26\",[23,34.447]],[\"comment/26\",[]],[\"name/27\",[24,34.447]],[\"comment/27\",[]],[\"name/28\",[12,19.783]],[\"comment/28\",[]],[\"name/29\",[25,34.447]],[\"comment/29\",[]],[\"name/30\",[26,34.447]],[\"comment/30\",[]],[\"name/31\",[27,34.447]],[\"comment/31\",[]],[\"name/32\",[28,29.339]],[\"comment/32\",[]],[\"name/33\",[29,34.447]],[\"comment/33\",[]],[\"name/34\",[12,19.783]],[\"comment/34\",[]],[\"name/35\",[30,34.447]],[\"comment/35\",[]],[\"name/36\",[31,34.447]],[\"comment/36\",[]],[\"name/37\",[32,34.447]],[\"comment/37\",[]],[\"name/38\",[33,34.447]],[\"comment/38\",[]],[\"name/39\",[34,34.447]],[\"comment/39\",[]],[\"name/40\",[35,34.447]],[\"comment/40\",[]],[\"name/41\",[12,19.783]],[\"comment/41\",[]],[\"name/42\",[36,34.447]],[\"comment/42\",[]],[\"name/43\",[37,34.447]],[\"comment/43\",[]],[\"name/44\",[28,29.339]],[\"comment/44\",[]],[\"name/45\",[38,34.447]],[\"comment/45\",[]]],\"invertedIndex\":[[\"__type\",{\"_index\":12,\"name\":{\"13\":{},\"18\":{},\"23\":{},\"28\":{},\"34\":{},\"41\":{}},\"comment\":{}}],[\"acquiretokenforresources\",{\"_index\":31,\"name\":{\"36\":{}},\"comment\":{}}],[\"appstate\",{\"_index\":35,\"name\":{\"40\":{}},\"comment\":{}}],[\"auth\",{\"_index\":13,\"name\":{\"14\":{}},\"comment\":{}}],[\"authconfig\",{\"_index\":11,\"name\":{\"12\":{}},\"comment\":{}}],[\"authenticate\",{\"_index\":3,\"name\":{\"3\":{}},\"comment\":{}}],[\"authenticatemiddlewareoptions\",{\"_index\":29,\"name\":{\"33\":{}},\"comment\":{}}],[\"authroutes\",{\"_index\":16,\"name\":{\"17\":{}},\"comment\":{}}],[\"cache\",{\"_index\":15,\"name\":{\"16\":{}},\"comment\":{}}],[\"customstate\",{\"_index\":37,\"name\":{\"43\":{}},\"comment\":{}}],[\"forcelogin\",{\"_index\":25,\"name\":{\"29\":{}},\"comment\":{}}],[\"frontchannellogouturi\",{\"_index\":18,\"name\":{\"20\":{}},\"comment\":{}}],[\"getauthconfig\",{\"_index\":6,\"name\":{\"6\":{}},\"comment\":{}}],[\"getcryptoprovider\",{\"_index\":8,\"name\":{\"8\":{}},\"comment\":{}}],[\"getlogger\",{\"_index\":9,\"name\":{\"9\":{}},\"comment\":{}}],[\"getmsalclient\",{\"_index\":10,\"name\":{\"10\":{}},\"comment\":{}}],[\"getmsalconfig\",{\"_index\":7,\"name\":{\"7\":{}},\"comment\":{}}],[\"guard\",{\"_index\":4,\"name\":{\"4\":{}},\"comment\":{}}],[\"idtokenclaims\",{\"_index\":28,\"name\":{\"32\":{},\"44\":{}},\"comment\":{}}],[\"initialize\",{\"_index\":1,\"name\":{\"1\":{}},\"comment\":{}}],[\"interactionerrorhandler\",{\"_index\":5,\"name\":{\"5\":{}},\"comment\":{}}],[\"loginoptions\",{\"_index\":32,\"name\":{\"37\":{}},\"comment\":{}}],[\"logoutoptions\",{\"_index\":33,\"name\":{\"38\":{}},\"comment\":{}}],[\"packageversion\",{\"_index\":38,\"name\":{\"45\":{}},\"comment\":{}}],[\"postfailureredirecturi\",{\"_index\":27,\"name\":{\"31\":{}},\"comment\":{}}],[\"postloginredirecturi\",{\"_index\":26,\"name\":{\"30\":{}},\"comment\":{}}],[\"postlogoutredirecturi\",{\"_index\":19,\"name\":{\"21\":{}},\"comment\":{}}],[\"protectallroutes\",{\"_index\":30,\"name\":{\"35\":{}},\"comment\":{}}],[\"protectedresourceparams\",{\"_index\":20,\"name\":{\"22\":{}},\"comment\":{}}],[\"protectedresourcesmap\",{\"_index\":23,\"name\":{\"26\":{}},\"comment\":{}}],[\"redirectto\",{\"_index\":36,\"name\":{\"42\":{}},\"comment\":{}}],[\"redirecturi\",{\"_index\":17,\"name\":{\"19\":{}},\"comment\":{}}],[\"routeguardoptions\",{\"_index\":24,\"name\":{\"27\":{}},\"comment\":{}}],[\"routes\",{\"_index\":22,\"name\":{\"25\":{}},\"comment\":{}}],[\"scopes\",{\"_index\":21,\"name\":{\"24\":{}},\"comment\":{}}],[\"system\",{\"_index\":14,\"name\":{\"15\":{}},\"comment\":{}}],[\"tokenrequestoptions\",{\"_index\":34,\"name\":{\"39\":{}},\"comment\":{}}],[\"webappauthconfig\",{\"_index\":2,\"name\":{\"2\":{},\"11\":{}},\"comment\":{}}],[\"webappauthprovider\",{\"_index\":0,\"name\":{\"0\":{}},\"comment\":{}}]],\"pipeline\":[]}}"); \ No newline at end of file +window.searchData = JSON.parse("{\"kinds\":{\"32\":\"Variable\",\"128\":\"Class\",\"512\":\"Constructor\",\"1024\":\"Property\",\"2048\":\"Method\",\"65536\":\"Type literal\",\"4194304\":\"Type alias\"},\"rows\":[{\"kind\":128,\"name\":\"WebAppAuthProvider\",\"url\":\"classes/WebAppAuthProvider.html\",\"classes\":\"tsd-kind-class\"},{\"kind\":2048,\"name\":\"initialize\",\"url\":\"classes/WebAppAuthProvider.html#initialize\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"WebAppAuthProvider\"},{\"kind\":1024,\"name\":\"webAppAuthConfig\",\"url\":\"classes/WebAppAuthProvider.html#webAppAuthConfig\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"WebAppAuthProvider\"},{\"kind\":2048,\"name\":\"authenticate\",\"url\":\"classes/WebAppAuthProvider.html#authenticate\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"WebAppAuthProvider\"},{\"kind\":2048,\"name\":\"guard\",\"url\":\"classes/WebAppAuthProvider.html#guard\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"WebAppAuthProvider\"},{\"kind\":2048,\"name\":\"interactionErrorHandler\",\"url\":\"classes/WebAppAuthProvider.html#interactionErrorHandler\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"WebAppAuthProvider\"},{\"kind\":2048,\"name\":\"getAuthConfig\",\"url\":\"classes/WebAppAuthProvider.html#getAuthConfig\",\"classes\":\"tsd-kind-method tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"WebAppAuthProvider\"},{\"kind\":2048,\"name\":\"getMsalConfig\",\"url\":\"classes/WebAppAuthProvider.html#getMsalConfig\",\"classes\":\"tsd-kind-method tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"WebAppAuthProvider\"},{\"kind\":2048,\"name\":\"getCryptoProvider\",\"url\":\"classes/WebAppAuthProvider.html#getCryptoProvider\",\"classes\":\"tsd-kind-method tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"WebAppAuthProvider\"},{\"kind\":2048,\"name\":\"getLogger\",\"url\":\"classes/WebAppAuthProvider.html#getLogger\",\"classes\":\"tsd-kind-method tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"WebAppAuthProvider\"},{\"kind\":2048,\"name\":\"getMsalClient\",\"url\":\"classes/WebAppAuthProvider.html#getMsalClient\",\"classes\":\"tsd-kind-method tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"WebAppAuthProvider\"},{\"kind\":128,\"name\":\"AuthContext\",\"url\":\"classes/AuthContext.html\",\"classes\":\"tsd-kind-class\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/AuthContext.html#constructor\",\"classes\":\"tsd-kind-constructor tsd-parent-kind-class\",\"parent\":\"AuthContext\"},{\"kind\":2048,\"name\":\"login\",\"url\":\"classes/AuthContext.html#login\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"AuthContext\"},{\"kind\":2048,\"name\":\"logout\",\"url\":\"classes/AuthContext.html#logout\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"AuthContext\"},{\"kind\":2048,\"name\":\"acquireToken\",\"url\":\"classes/AuthContext.html#acquireToken\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"AuthContext\"},{\"kind\":2048,\"name\":\"getAccount\",\"url\":\"classes/AuthContext.html#getAccount\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"AuthContext\"},{\"kind\":2048,\"name\":\"isAuthenticated\",\"url\":\"classes/AuthContext.html#isAuthenticated\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"AuthContext\"},{\"kind\":2048,\"name\":\"getCachedTokenForResource\",\"url\":\"classes/AuthContext.html#getCachedTokenForResource\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"AuthContext\"},{\"kind\":4194304,\"name\":\"RequestContext\",\"url\":\"types/RequestContext.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"types/RequestContext.html#__type\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-type-alias\",\"parent\":\"RequestContext\"},{\"kind\":1024,\"name\":\"req\",\"url\":\"types/RequestContext.html#__type.req\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"RequestContext.__type\"},{\"kind\":1024,\"name\":\"res\",\"url\":\"types/RequestContext.html#__type.res\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"RequestContext.__type\"},{\"kind\":1024,\"name\":\"next\",\"url\":\"types/RequestContext.html#__type.next\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"RequestContext.__type\"},{\"kind\":4194304,\"name\":\"WebAppAuthConfig\",\"url\":\"types/WebAppAuthConfig.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"AuthConfig\",\"url\":\"types/AuthConfig.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"types/AuthConfig.html#__type\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-type-alias\",\"parent\":\"AuthConfig\"},{\"kind\":1024,\"name\":\"auth\",\"url\":\"types/AuthConfig.html#__type.auth\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"AuthConfig.__type\"},{\"kind\":1024,\"name\":\"system\",\"url\":\"types/AuthConfig.html#__type.system\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"AuthConfig.__type\"},{\"kind\":1024,\"name\":\"cache\",\"url\":\"types/AuthConfig.html#__type.cache\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"AuthConfig.__type\"},{\"kind\":4194304,\"name\":\"AuthRoutes\",\"url\":\"types/AuthRoutes.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"types/AuthRoutes.html#__type\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-type-alias\",\"parent\":\"AuthRoutes\"},{\"kind\":1024,\"name\":\"redirectUri\",\"url\":\"types/AuthRoutes.html#__type.redirectUri\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"AuthRoutes.__type\"},{\"kind\":1024,\"name\":\"frontChannelLogoutUri\",\"url\":\"types/AuthRoutes.html#__type.frontChannelLogoutUri\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"AuthRoutes.__type\"},{\"kind\":1024,\"name\":\"postLogoutRedirectUri\",\"url\":\"types/AuthRoutes.html#__type.postLogoutRedirectUri\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"AuthRoutes.__type\"},{\"kind\":4194304,\"name\":\"ProtectedResourceParams\",\"url\":\"types/ProtectedResourceParams.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"types/ProtectedResourceParams.html#__type\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-type-alias\",\"parent\":\"ProtectedResourceParams\"},{\"kind\":1024,\"name\":\"scopes\",\"url\":\"types/ProtectedResourceParams.html#__type.scopes\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"ProtectedResourceParams.__type\"},{\"kind\":1024,\"name\":\"routes\",\"url\":\"types/ProtectedResourceParams.html#__type.routes\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"ProtectedResourceParams.__type\"},{\"kind\":4194304,\"name\":\"ProtectedResourcesMap\",\"url\":\"types/ProtectedResourcesMap.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"RouteGuardOptions\",\"url\":\"types/RouteGuardOptions.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"types/RouteGuardOptions.html#__type\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-type-alias\",\"parent\":\"RouteGuardOptions\"},{\"kind\":1024,\"name\":\"forceLogin\",\"url\":\"types/RouteGuardOptions.html#__type.forceLogin\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"RouteGuardOptions.__type\"},{\"kind\":1024,\"name\":\"postLoginRedirectUri\",\"url\":\"types/RouteGuardOptions.html#__type.postLoginRedirectUri\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"RouteGuardOptions.__type\"},{\"kind\":1024,\"name\":\"postFailureRedirectUri\",\"url\":\"types/RouteGuardOptions.html#__type.postFailureRedirectUri\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"RouteGuardOptions.__type\"},{\"kind\":1024,\"name\":\"idTokenClaims\",\"url\":\"types/RouteGuardOptions.html#__type.idTokenClaims\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"RouteGuardOptions.__type\"},{\"kind\":4194304,\"name\":\"AuthenticateMiddlewareOptions\",\"url\":\"types/AuthenticateMiddlewareOptions.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"types/AuthenticateMiddlewareOptions.html#__type\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-type-alias\",\"parent\":\"AuthenticateMiddlewareOptions\"},{\"kind\":1024,\"name\":\"protectAllRoutes\",\"url\":\"types/AuthenticateMiddlewareOptions.html#__type.protectAllRoutes\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"AuthenticateMiddlewareOptions.__type\"},{\"kind\":1024,\"name\":\"acquireTokenForResources\",\"url\":\"types/AuthenticateMiddlewareOptions.html#__type.acquireTokenForResources\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"AuthenticateMiddlewareOptions.__type\"},{\"kind\":4194304,\"name\":\"LoginOptions\",\"url\":\"types/LoginOptions.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"LogoutOptions\",\"url\":\"types/LogoutOptions.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"TokenRequestOptions\",\"url\":\"types/TokenRequestOptions.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"AppState\",\"url\":\"types/AppState.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"types/AppState.html#__type\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-type-alias\",\"parent\":\"AppState\"},{\"kind\":1024,\"name\":\"redirectTo\",\"url\":\"types/AppState.html#__type.redirectTo\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"AppState.__type\"},{\"kind\":1024,\"name\":\"customState\",\"url\":\"types/AppState.html#__type.customState\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"AppState.__type\"},{\"kind\":4194304,\"name\":\"IdTokenClaims\",\"url\":\"types/IdTokenClaims.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":128,\"name\":\"AccessDeniedError\",\"url\":\"classes/AccessDeniedError.html\",\"classes\":\"tsd-kind-class\"},{\"kind\":2048,\"name\":\"createUnauthorizedAccessError\",\"url\":\"classes/AccessDeniedError.html#createUnauthorizedAccessError\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"AccessDeniedError\"},{\"kind\":2048,\"name\":\"createForbiddenAccessError\",\"url\":\"classes/AccessDeniedError.html#createForbiddenAccessError\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"AccessDeniedError\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/AccessDeniedError.html#constructor\",\"classes\":\"tsd-kind-constructor tsd-parent-kind-class\",\"parent\":\"AccessDeniedError\"},{\"kind\":1024,\"name\":\"route\",\"url\":\"classes/AccessDeniedError.html#route\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"AccessDeniedError\"},{\"kind\":1024,\"name\":\"account\",\"url\":\"classes/AccessDeniedError.html#account\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"AccessDeniedError\"},{\"kind\":128,\"name\":\"InteractionRequiredError\",\"url\":\"classes/InteractionRequiredError.html\",\"classes\":\"tsd-kind-class\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/InteractionRequiredError.html#constructor\",\"classes\":\"tsd-kind-constructor tsd-parent-kind-class\",\"parent\":\"InteractionRequiredError\"},{\"kind\":1024,\"name\":\"requestOptions\",\"url\":\"classes/InteractionRequiredError.html#requestOptions\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"InteractionRequiredError\"},{\"kind\":32,\"name\":\"packageVersion\",\"url\":\"variables/packageVersion.html\",\"classes\":\"tsd-kind-variable\"}],\"index\":{\"version\":\"2.3.9\",\"fields\":[\"name\",\"comment\"],\"fieldVectors\":[[\"name/0\",[0,38.286]],[\"comment/0\",[]],[\"name/1\",[1,38.286]],[\"comment/1\",[]],[\"name/2\",[2,33.178]],[\"comment/2\",[]],[\"name/3\",[3,38.286]],[\"comment/3\",[]],[\"name/4\",[4,38.286]],[\"comment/4\",[]],[\"name/5\",[5,38.286]],[\"comment/5\",[]],[\"name/6\",[6,38.286]],[\"comment/6\",[]],[\"name/7\",[7,38.286]],[\"comment/7\",[]],[\"name/8\",[8,38.286]],[\"comment/8\",[]],[\"name/9\",[9,38.286]],[\"comment/9\",[]],[\"name/10\",[10,38.286]],[\"comment/10\",[]],[\"name/11\",[11,38.286]],[\"comment/11\",[]],[\"name/12\",[12,29.813]],[\"comment/12\",[]],[\"name/13\",[13,38.286]],[\"comment/13\",[]],[\"name/14\",[14,38.286]],[\"comment/14\",[]],[\"name/15\",[15,38.286]],[\"comment/15\",[]],[\"name/16\",[16,38.286]],[\"comment/16\",[]],[\"name/17\",[17,38.286]],[\"comment/17\",[]],[\"name/18\",[18,38.286]],[\"comment/18\",[]],[\"name/19\",[19,38.286]],[\"comment/19\",[]],[\"name/20\",[20,22.192]],[\"comment/20\",[]],[\"name/21\",[21,38.286]],[\"comment/21\",[]],[\"name/22\",[22,38.286]],[\"comment/22\",[]],[\"name/23\",[23,38.286]],[\"comment/23\",[]],[\"name/24\",[2,33.178]],[\"comment/24\",[]],[\"name/25\",[24,38.286]],[\"comment/25\",[]],[\"name/26\",[20,22.192]],[\"comment/26\",[]],[\"name/27\",[25,38.286]],[\"comment/27\",[]],[\"name/28\",[26,38.286]],[\"comment/28\",[]],[\"name/29\",[27,38.286]],[\"comment/29\",[]],[\"name/30\",[28,38.286]],[\"comment/30\",[]],[\"name/31\",[20,22.192]],[\"comment/31\",[]],[\"name/32\",[29,38.286]],[\"comment/32\",[]],[\"name/33\",[30,38.286]],[\"comment/33\",[]],[\"name/34\",[31,38.286]],[\"comment/34\",[]],[\"name/35\",[32,38.286]],[\"comment/35\",[]],[\"name/36\",[20,22.192]],[\"comment/36\",[]],[\"name/37\",[33,38.286]],[\"comment/37\",[]],[\"name/38\",[34,38.286]],[\"comment/38\",[]],[\"name/39\",[35,38.286]],[\"comment/39\",[]],[\"name/40\",[36,38.286]],[\"comment/40\",[]],[\"name/41\",[20,22.192]],[\"comment/41\",[]],[\"name/42\",[37,38.286]],[\"comment/42\",[]],[\"name/43\",[38,38.286]],[\"comment/43\",[]],[\"name/44\",[39,38.286]],[\"comment/44\",[]],[\"name/45\",[40,33.178]],[\"comment/45\",[]],[\"name/46\",[41,38.286]],[\"comment/46\",[]],[\"name/47\",[20,22.192]],[\"comment/47\",[]],[\"name/48\",[42,38.286]],[\"comment/48\",[]],[\"name/49\",[43,38.286]],[\"comment/49\",[]],[\"name/50\",[44,38.286]],[\"comment/50\",[]],[\"name/51\",[45,38.286]],[\"comment/51\",[]],[\"name/52\",[46,38.286]],[\"comment/52\",[]],[\"name/53\",[47,38.286]],[\"comment/53\",[]],[\"name/54\",[20,22.192]],[\"comment/54\",[]],[\"name/55\",[48,38.286]],[\"comment/55\",[]],[\"name/56\",[49,38.286]],[\"comment/56\",[]],[\"name/57\",[40,33.178]],[\"comment/57\",[]],[\"name/58\",[50,38.286]],[\"comment/58\",[]],[\"name/59\",[51,38.286]],[\"comment/59\",[]],[\"name/60\",[52,38.286]],[\"comment/60\",[]],[\"name/61\",[12,29.813]],[\"comment/61\",[]],[\"name/62\",[53,38.286]],[\"comment/62\",[]],[\"name/63\",[54,38.286]],[\"comment/63\",[]],[\"name/64\",[55,38.286]],[\"comment/64\",[]],[\"name/65\",[12,29.813]],[\"comment/65\",[]],[\"name/66\",[56,38.286]],[\"comment/66\",[]],[\"name/67\",[57,38.286]],[\"comment/67\",[]]],\"invertedIndex\":[[\"__type\",{\"_index\":20,\"name\":{\"20\":{},\"26\":{},\"31\":{},\"36\":{},\"41\":{},\"47\":{},\"54\":{}},\"comment\":{}}],[\"accessdeniederror\",{\"_index\":50,\"name\":{\"58\":{}},\"comment\":{}}],[\"account\",{\"_index\":54,\"name\":{\"63\":{}},\"comment\":{}}],[\"acquiretoken\",{\"_index\":15,\"name\":{\"15\":{}},\"comment\":{}}],[\"acquiretokenforresources\",{\"_index\":43,\"name\":{\"49\":{}},\"comment\":{}}],[\"appstate\",{\"_index\":47,\"name\":{\"53\":{}},\"comment\":{}}],[\"auth\",{\"_index\":25,\"name\":{\"27\":{}},\"comment\":{}}],[\"authconfig\",{\"_index\":24,\"name\":{\"25\":{}},\"comment\":{}}],[\"authcontext\",{\"_index\":11,\"name\":{\"11\":{}},\"comment\":{}}],[\"authenticate\",{\"_index\":3,\"name\":{\"3\":{}},\"comment\":{}}],[\"authenticatemiddlewareoptions\",{\"_index\":41,\"name\":{\"46\":{}},\"comment\":{}}],[\"authroutes\",{\"_index\":28,\"name\":{\"30\":{}},\"comment\":{}}],[\"cache\",{\"_index\":27,\"name\":{\"29\":{}},\"comment\":{}}],[\"constructor\",{\"_index\":12,\"name\":{\"12\":{},\"61\":{},\"65\":{}},\"comment\":{}}],[\"createforbiddenaccesserror\",{\"_index\":52,\"name\":{\"60\":{}},\"comment\":{}}],[\"createunauthorizedaccesserror\",{\"_index\":51,\"name\":{\"59\":{}},\"comment\":{}}],[\"customstate\",{\"_index\":49,\"name\":{\"56\":{}},\"comment\":{}}],[\"forcelogin\",{\"_index\":37,\"name\":{\"42\":{}},\"comment\":{}}],[\"frontchannellogouturi\",{\"_index\":30,\"name\":{\"33\":{}},\"comment\":{}}],[\"getaccount\",{\"_index\":16,\"name\":{\"16\":{}},\"comment\":{}}],[\"getauthconfig\",{\"_index\":6,\"name\":{\"6\":{}},\"comment\":{}}],[\"getcachedtokenforresource\",{\"_index\":18,\"name\":{\"18\":{}},\"comment\":{}}],[\"getcryptoprovider\",{\"_index\":8,\"name\":{\"8\":{}},\"comment\":{}}],[\"getlogger\",{\"_index\":9,\"name\":{\"9\":{}},\"comment\":{}}],[\"getmsalclient\",{\"_index\":10,\"name\":{\"10\":{}},\"comment\":{}}],[\"getmsalconfig\",{\"_index\":7,\"name\":{\"7\":{}},\"comment\":{}}],[\"guard\",{\"_index\":4,\"name\":{\"4\":{}},\"comment\":{}}],[\"idtokenclaims\",{\"_index\":40,\"name\":{\"45\":{},\"57\":{}},\"comment\":{}}],[\"initialize\",{\"_index\":1,\"name\":{\"1\":{}},\"comment\":{}}],[\"interactionerrorhandler\",{\"_index\":5,\"name\":{\"5\":{}},\"comment\":{}}],[\"interactionrequirederror\",{\"_index\":55,\"name\":{\"64\":{}},\"comment\":{}}],[\"isauthenticated\",{\"_index\":17,\"name\":{\"17\":{}},\"comment\":{}}],[\"login\",{\"_index\":13,\"name\":{\"13\":{}},\"comment\":{}}],[\"loginoptions\",{\"_index\":44,\"name\":{\"50\":{}},\"comment\":{}}],[\"logout\",{\"_index\":14,\"name\":{\"14\":{}},\"comment\":{}}],[\"logoutoptions\",{\"_index\":45,\"name\":{\"51\":{}},\"comment\":{}}],[\"next\",{\"_index\":23,\"name\":{\"23\":{}},\"comment\":{}}],[\"packageversion\",{\"_index\":57,\"name\":{\"67\":{}},\"comment\":{}}],[\"postfailureredirecturi\",{\"_index\":39,\"name\":{\"44\":{}},\"comment\":{}}],[\"postloginredirecturi\",{\"_index\":38,\"name\":{\"43\":{}},\"comment\":{}}],[\"postlogoutredirecturi\",{\"_index\":31,\"name\":{\"34\":{}},\"comment\":{}}],[\"protectallroutes\",{\"_index\":42,\"name\":{\"48\":{}},\"comment\":{}}],[\"protectedresourceparams\",{\"_index\":32,\"name\":{\"35\":{}},\"comment\":{}}],[\"protectedresourcesmap\",{\"_index\":35,\"name\":{\"39\":{}},\"comment\":{}}],[\"redirectto\",{\"_index\":48,\"name\":{\"55\":{}},\"comment\":{}}],[\"redirecturi\",{\"_index\":29,\"name\":{\"32\":{}},\"comment\":{}}],[\"req\",{\"_index\":21,\"name\":{\"21\":{}},\"comment\":{}}],[\"requestcontext\",{\"_index\":19,\"name\":{\"19\":{}},\"comment\":{}}],[\"requestoptions\",{\"_index\":56,\"name\":{\"66\":{}},\"comment\":{}}],[\"res\",{\"_index\":22,\"name\":{\"22\":{}},\"comment\":{}}],[\"route\",{\"_index\":53,\"name\":{\"62\":{}},\"comment\":{}}],[\"routeguardoptions\",{\"_index\":36,\"name\":{\"40\":{}},\"comment\":{}}],[\"routes\",{\"_index\":34,\"name\":{\"38\":{}},\"comment\":{}}],[\"scopes\",{\"_index\":33,\"name\":{\"37\":{}},\"comment\":{}}],[\"system\",{\"_index\":26,\"name\":{\"28\":{}},\"comment\":{}}],[\"tokenrequestoptions\",{\"_index\":46,\"name\":{\"52\":{}},\"comment\":{}}],[\"webappauthconfig\",{\"_index\":2,\"name\":{\"2\":{},\"24\":{}},\"comment\":{}}],[\"webappauthprovider\",{\"_index\":0,\"name\":{\"0\":{}},\"comment\":{}}]],\"pipeline\":[]}}"); \ No newline at end of file diff --git a/docs/classes/AccessDeniedError.html b/docs/classes/AccessDeniedError.html new file mode 100644 index 0000000..a8b3258 --- /dev/null +++ b/docs/classes/AccessDeniedError.html @@ -0,0 +1,151 @@ +AccessDeniedError | msal-node-wrapper
+
+ +
+
+
+
+ +

Class AccessDeniedError

+
+

Error thrown when the user is not authorized to access a route

+
+
+

Hierarchy

+
    +
  • AuthError +
      +
    • AccessDeniedError
+
+
+
+ +
+
+

Constructors

+
+
+

Properties

+
+
+

Methods

+
+
+

Constructors

+
+ +
    + +
  • +
    +

    Parameters

    +
      +
    • +
      errorCode: string
    • +
    • +
      Optional errorMessage: string
    • +
    • +
      Optional route: string
    • +
    • +
      Optional account: AccountInfo
    +

    Returns AccessDeniedError

+
+

Properties

+
+ +
account?: AccountInfo
+
+ +
route?: string
+
+

Methods

+
+ +
+
+ +
+
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/docs/classes/AuthContext.html b/docs/classes/AuthContext.html new file mode 100644 index 0000000..af4d48f --- /dev/null +++ b/docs/classes/AuthContext.html @@ -0,0 +1,181 @@ +AuthContext | msal-node-wrapper
+
+ +
+
+
+
+ +

Class AuthContext

+
+

Hierarchy

+
    +
  • AuthContext
+
+
+
+ +
+
+

Constructors

+
+ +
+
+

Methods

+
+ +
    + +
  • +

    Acquires an access token for given request parameters

    + +

    Returns

    +
    +

    Parameters

    +
    +

    Returns RequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any>>

+
+ +
    + +
  • +

    Returns the current user account from session

    + +

    Returns

    account object

    +
    +

    Returns undefined | AccountInfo

+
+ +
    + +
  • +

    Returns the cached token for a given resource

    + +

    Returns

    cached access token

    +
    +
    +

    Parameters

    +
      +
    • +
      resourceName: string
    +

    Returns null | string

+
+ +
+
+ +
    + +
  • +

    Initiates a login flow with given options

    + +

    Returns

    +
    +

    Parameters

    +
    +

    Returns RequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any>>

+
+ +
    + +
  • +

    Initiates a logout flow and destroys the current session

    + +

    Returns

    +
    +

    Parameters

    +
    +

    Returns RequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any>>

+
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/docs/classes/InteractionRequiredError.html b/docs/classes/InteractionRequiredError.html new file mode 100644 index 0000000..51d9526 --- /dev/null +++ b/docs/classes/InteractionRequiredError.html @@ -0,0 +1,97 @@ +InteractionRequiredError | msal-node-wrapper
+
+ +
+
+
+
+ +

Class InteractionRequiredError

+
+

Error thrown when user interaction is required.

+
+
+

Hierarchy

+
    +
  • InteractionRequiredAuthError +
      +
    • InteractionRequiredError
+
+
+
+ +
+
+

Constructors

+
+
+

Properties

+
+
+

Constructors

+
+ +
+
+

Properties

+
+ +
requestOptions: LoginOptions
+
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/docs/classes/WebAppAuthProvider.html b/docs/classes/WebAppAuthProvider.html index 15e948e..5313e25 100644 --- a/docs/classes/WebAppAuthProvider.html +++ b/docs/classes/WebAppAuthProvider.html @@ -22,7 +22,7 @@

Hierarchy

  • WebAppAuthProvider
+
  • Defined in provider/WebAppAuthProvider.ts:17
  • @@ -50,7 +50,7 @@

    Properties

    webAppAuthConfig: WebAppAuthConfig
    +
  • Defined in provider/WebAppAuthProvider.ts:18
  • Methods

    @@ -68,7 +68,7 @@

    Parameters

    options: AuthenticateMiddlewareOptions = ...

    Returns RequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any>>

    +
  • Defined in provider/WebAppAuthProvider.ts:60
  • +
  • Defined in provider/BaseAuthProvider.ts:29
  • +
  • Defined in provider/BaseAuthProvider.ts:37
  • +
  • Defined in provider/BaseAuthProvider.ts:41
  • +
  • Defined in provider/BaseAuthProvider.ts:45
  • +
  • Defined in provider/BaseAuthProvider.ts:33
  • Returns RequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any>>

    +
  • Defined in provider/WebAppAuthProvider.ts:71
  • +
  • Defined in provider/WebAppAuthProvider.ts:81
    • @@ -156,7 +156,7 @@

      Parameters

      authConfig: AuthConfig

    Returns Promise<WebAppAuthProvider>

    +
  • Defined in provider/WebAppAuthProvider.ts:30
  • +
  • Defined in middleware/MiddlewareOptions.ts:41
  • +
  • Defined in config/ConfigurationTypes.ts:8
  • +
  • Defined in config/ConfigurationTypes.ts:18
  • +
  • Defined in middleware/MiddlewareOptions.ts:10
  • +
  • Defined in middleware/MiddlewareOptions.ts:46
  • +
  • Defined in middleware/MiddlewareOptions.ts:15
  • +
  • Defined in middleware/MiddlewareOptions.ts:20
  • +
  • Defined in config/ConfigurationTypes.ts:26
  • +
  • Defined in config/ConfigurationTypes.ts:24
  • +
  • Defined in middleware/MiddlewareOptions.ts:34
  • +
  • Defined in middleware/MiddlewareOptions.ts:26
  • +
  • Defined in config/ConfigurationTypes.ts:14
  • +
  • Defined in packageMetadata.ts:7