@azure/identity-broker 1.1.1-alpha.20241112.1 → 1.1.1-alpha.20241113.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/index.d.ts +24 -0
- package/dist/browser/index.d.ts.map +1 -0
- package/dist/browser/index.js.map +1 -0
- package/dist/browser/package.json +3 -0
- package/dist/commonjs/index.d.ts +24 -0
- package/dist/commonjs/index.d.ts.map +1 -0
- package/dist/{index.js → commonjs/index.js} +6 -9
- package/dist/commonjs/index.js.map +1 -0
- package/dist/commonjs/package.json +3 -0
- package/dist/commonjs/tsdoc-metadata.json +11 -0
- package/dist/esm/index.d.ts +24 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +30 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/package.json +49 -20
- package/dist/index.js.map +0 -1
- package/dist-esm/identity/src/constants.js +0 -70
- package/dist-esm/identity/src/constants.js.map +0 -1
- package/dist-esm/identity/src/credentials/visualStudioCodeCredentialPlugin.js +0 -4
- package/dist-esm/identity/src/credentials/visualStudioCodeCredentialPlugin.js.map +0 -1
- package/dist-esm/identity/src/msal/nodeFlows/tokenCachePersistenceOptions.js +0 -4
- package/dist-esm/identity/src/msal/nodeFlows/tokenCachePersistenceOptions.js.map +0 -1
- package/dist-esm/identity/src/plugins/provider.js +0 -4
- package/dist-esm/identity/src/plugins/provider.js.map +0 -1
- package/dist-esm/identity-broker/src/index.js.map +0 -1
- /package/{dist-esm/identity-broker/src → dist/browser}/index.js +0 -0
- /package/{types → dist}/identity-broker.d.ts +0 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { IdentityPlugin } from "@azure/identity";
|
|
2
|
+
/**
|
|
3
|
+
* A plugin that provides WAM Integration for `@azure/identity`
|
|
4
|
+
* credentials. The plugin API is compatible with `@azure/identity` versions
|
|
5
|
+
* 4.0.0 and later. Load this plugin using the `useIdentityPlugin`
|
|
6
|
+
* function, imported from `@azure/identity`.
|
|
7
|
+
*
|
|
8
|
+
* Example:
|
|
9
|
+
*
|
|
10
|
+
* ```ts snippet:using_plugins
|
|
11
|
+
* import { useIdentityPlugin, InteractiveBrowserCredential } from "@azure/identity";
|
|
12
|
+
* import { nativeBrokerPlugin } from "@azure/identity-broker";
|
|
13
|
+
*
|
|
14
|
+
* useIdentityPlugin(nativeBrokerPlugin);
|
|
15
|
+
* const credential = new InteractiveBrowserCredential({
|
|
16
|
+
* brokerOptions: {
|
|
17
|
+
* enabled: true,
|
|
18
|
+
* parentWindowHandle: new Uint8Array(0), // This should be a handle to the parent window
|
|
19
|
+
* },
|
|
20
|
+
* });
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export declare const nativeBrokerPlugin: IdentityPlugin;
|
|
24
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAiBtD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,kBAAkB,EAAE,cAIhC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAgBjE;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAmB,CAAC,OAAgB,EAAE,EAAE;IACrE,MAAM,EAAE,yBAAyB,EAAE,GAAG,OAA6B,CAAC;IACpE,MAAM,YAAY,GAAG,IAAI,kBAAkB,EAAE,CAAC;IAC9C,yBAAyB,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC;AAC1D,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { IdentityPlugin } from \"@azure/identity\";\nimport { NativeBrokerPlugin } from \"@azure/msal-node-extensions\";\n\n/**\n * A subset of the AzurePluginContext provided by \\@azure/identity\n *\n * @internal\n */\ninterface AzurePluginContext {\n nativeBrokerPluginControl: NativeBrokerPluginControl;\n}\n\ninterface NativeBrokerPluginControl {\n // eslint-disable-next-line @typescript-eslint/consistent-type-imports\n setNativeBroker(nativeBroker: import(\"@azure/msal-node\").INativeBrokerPlugin): void;\n}\n\n/**\n * A plugin that provides WAM Integration for `@azure/identity`\n * credentials. The plugin API is compatible with `@azure/identity` versions\n * 4.0.0 and later. Load this plugin using the `useIdentityPlugin`\n * function, imported from `@azure/identity`.\n *\n * Example:\n *\n * ```ts snippet:using_plugins\n * import { useIdentityPlugin, InteractiveBrowserCredential } from \"@azure/identity\";\n * import { nativeBrokerPlugin } from \"@azure/identity-broker\";\n *\n * useIdentityPlugin(nativeBrokerPlugin);\n * const credential = new InteractiveBrowserCredential({\n * brokerOptions: {\n * enabled: true,\n * parentWindowHandle: new Uint8Array(0), // This should be a handle to the parent window\n * },\n * });\n * ```\n */\nexport const nativeBrokerPlugin: IdentityPlugin = (context: unknown) => {\n const { nativeBrokerPluginControl } = context as AzurePluginContext;\n const brokerPlugin = new NativeBrokerPlugin();\n nativeBrokerPluginControl.setNativeBroker(brokerPlugin);\n};\n"]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { IdentityPlugin } from "@azure/identity";
|
|
2
|
+
/**
|
|
3
|
+
* A plugin that provides WAM Integration for `@azure/identity`
|
|
4
|
+
* credentials. The plugin API is compatible with `@azure/identity` versions
|
|
5
|
+
* 4.0.0 and later. Load this plugin using the `useIdentityPlugin`
|
|
6
|
+
* function, imported from `@azure/identity`.
|
|
7
|
+
*
|
|
8
|
+
* Example:
|
|
9
|
+
*
|
|
10
|
+
* ```ts snippet:using_plugins
|
|
11
|
+
* import { useIdentityPlugin, InteractiveBrowserCredential } from "@azure/identity";
|
|
12
|
+
* import { nativeBrokerPlugin } from "@azure/identity-broker";
|
|
13
|
+
*
|
|
14
|
+
* useIdentityPlugin(nativeBrokerPlugin);
|
|
15
|
+
* const credential = new InteractiveBrowserCredential({
|
|
16
|
+
* brokerOptions: {
|
|
17
|
+
* enabled: true,
|
|
18
|
+
* parentWindowHandle: new Uint8Array(0), // This should be a handle to the parent window
|
|
19
|
+
* },
|
|
20
|
+
* });
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export declare const nativeBrokerPlugin: IdentityPlugin;
|
|
24
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAiBtD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,kBAAkB,EAAE,cAIhC,CAAC"}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var msalNodeExtensions = require('@azure/msal-node-extensions');
|
|
6
|
-
|
|
1
|
+
"use strict";
|
|
7
2
|
// Copyright (c) Microsoft Corporation.
|
|
8
3
|
// Licensed under the MIT License.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.nativeBrokerPlugin = void 0;
|
|
6
|
+
const msal_node_extensions_1 = require("@azure/msal-node-extensions");
|
|
9
7
|
/**
|
|
10
8
|
* A plugin that provides WAM Integration for `@azure/identity`
|
|
11
9
|
* credentials. The plugin API is compatible with `@azure/identity` versions
|
|
@@ -29,9 +27,8 @@ var msalNodeExtensions = require('@azure/msal-node-extensions');
|
|
|
29
27
|
*/
|
|
30
28
|
const nativeBrokerPlugin = (context) => {
|
|
31
29
|
const { nativeBrokerPluginControl } = context;
|
|
32
|
-
const brokerPlugin = new
|
|
30
|
+
const brokerPlugin = new msal_node_extensions_1.NativeBrokerPlugin();
|
|
33
31
|
nativeBrokerPluginControl.setNativeBroker(brokerPlugin);
|
|
34
32
|
};
|
|
35
|
-
|
|
36
33
|
exports.nativeBrokerPlugin = nativeBrokerPlugin;
|
|
37
|
-
//# sourceMappingURL=index.js.map
|
|
34
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAGlC,sEAAiE;AAgBjE;;;;;;;;;;;;;;;;;;;;GAoBG;AACI,MAAM,kBAAkB,GAAmB,CAAC,OAAgB,EAAE,EAAE;IACrE,MAAM,EAAE,yBAAyB,EAAE,GAAG,OAA6B,CAAC;IACpE,MAAM,YAAY,GAAG,IAAI,yCAAkB,EAAE,CAAC;IAC9C,yBAAyB,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC;AAC1D,CAAC,CAAC;AAJW,QAAA,kBAAkB,sBAI7B","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { IdentityPlugin } from \"@azure/identity\";\nimport { NativeBrokerPlugin } from \"@azure/msal-node-extensions\";\n\n/**\n * A subset of the AzurePluginContext provided by \\@azure/identity\n *\n * @internal\n */\ninterface AzurePluginContext {\n nativeBrokerPluginControl: NativeBrokerPluginControl;\n}\n\ninterface NativeBrokerPluginControl {\n // eslint-disable-next-line @typescript-eslint/consistent-type-imports\n setNativeBroker(nativeBroker: import(\"@azure/msal-node\").INativeBrokerPlugin): void;\n}\n\n/**\n * A plugin that provides WAM Integration for `@azure/identity`\n * credentials. The plugin API is compatible with `@azure/identity` versions\n * 4.0.0 and later. Load this plugin using the `useIdentityPlugin`\n * function, imported from `@azure/identity`.\n *\n * Example:\n *\n * ```ts snippet:using_plugins\n * import { useIdentityPlugin, InteractiveBrowserCredential } from \"@azure/identity\";\n * import { nativeBrokerPlugin } from \"@azure/identity-broker\";\n *\n * useIdentityPlugin(nativeBrokerPlugin);\n * const credential = new InteractiveBrowserCredential({\n * brokerOptions: {\n * enabled: true,\n * parentWindowHandle: new Uint8Array(0), // This should be a handle to the parent window\n * },\n * });\n * ```\n */\nexport const nativeBrokerPlugin: IdentityPlugin = (context: unknown) => {\n const { nativeBrokerPluginControl } = context as AzurePluginContext;\n const brokerPlugin = new NativeBrokerPlugin();\n nativeBrokerPluginControl.setNativeBroker(brokerPlugin);\n};\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// This file is read by tools that parse documentation comments conforming to the TSDoc standard.
|
|
2
|
+
// It should be published with your NPM package. It should not be tracked by Git.
|
|
3
|
+
{
|
|
4
|
+
"tsdocVersion": "0.12",
|
|
5
|
+
"toolPackages": [
|
|
6
|
+
{
|
|
7
|
+
"packageName": "@microsoft/api-extractor",
|
|
8
|
+
"packageVersion": "7.47.11"
|
|
9
|
+
}
|
|
10
|
+
]
|
|
11
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { IdentityPlugin } from "@azure/identity";
|
|
2
|
+
/**
|
|
3
|
+
* A plugin that provides WAM Integration for `@azure/identity`
|
|
4
|
+
* credentials. The plugin API is compatible with `@azure/identity` versions
|
|
5
|
+
* 4.0.0 and later. Load this plugin using the `useIdentityPlugin`
|
|
6
|
+
* function, imported from `@azure/identity`.
|
|
7
|
+
*
|
|
8
|
+
* Example:
|
|
9
|
+
*
|
|
10
|
+
* ```ts snippet:using_plugins
|
|
11
|
+
* import { useIdentityPlugin, InteractiveBrowserCredential } from "@azure/identity";
|
|
12
|
+
* import { nativeBrokerPlugin } from "@azure/identity-broker";
|
|
13
|
+
*
|
|
14
|
+
* useIdentityPlugin(nativeBrokerPlugin);
|
|
15
|
+
* const credential = new InteractiveBrowserCredential({
|
|
16
|
+
* brokerOptions: {
|
|
17
|
+
* enabled: true,
|
|
18
|
+
* parentWindowHandle: new Uint8Array(0), // This should be a handle to the parent window
|
|
19
|
+
* },
|
|
20
|
+
* });
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export declare const nativeBrokerPlugin: IdentityPlugin;
|
|
24
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAiBtD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,kBAAkB,EAAE,cAIhC,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
import { NativeBrokerPlugin } from "@azure/msal-node-extensions";
|
|
4
|
+
/**
|
|
5
|
+
* A plugin that provides WAM Integration for `@azure/identity`
|
|
6
|
+
* credentials. The plugin API is compatible with `@azure/identity` versions
|
|
7
|
+
* 4.0.0 and later. Load this plugin using the `useIdentityPlugin`
|
|
8
|
+
* function, imported from `@azure/identity`.
|
|
9
|
+
*
|
|
10
|
+
* Example:
|
|
11
|
+
*
|
|
12
|
+
* ```ts snippet:using_plugins
|
|
13
|
+
* import { useIdentityPlugin, InteractiveBrowserCredential } from "@azure/identity";
|
|
14
|
+
* import { nativeBrokerPlugin } from "@azure/identity-broker";
|
|
15
|
+
*
|
|
16
|
+
* useIdentityPlugin(nativeBrokerPlugin);
|
|
17
|
+
* const credential = new InteractiveBrowserCredential({
|
|
18
|
+
* brokerOptions: {
|
|
19
|
+
* enabled: true,
|
|
20
|
+
* parentWindowHandle: new Uint8Array(0), // This should be a handle to the parent window
|
|
21
|
+
* },
|
|
22
|
+
* });
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
export const nativeBrokerPlugin = (context) => {
|
|
26
|
+
const { nativeBrokerPluginControl } = context;
|
|
27
|
+
const brokerPlugin = new NativeBrokerPlugin();
|
|
28
|
+
nativeBrokerPluginControl.setNativeBroker(brokerPlugin);
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAgBjE;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAmB,CAAC,OAAgB,EAAE,EAAE;IACrE,MAAM,EAAE,yBAAyB,EAAE,GAAG,OAA6B,CAAC;IACpE,MAAM,YAAY,GAAG,IAAI,kBAAkB,EAAE,CAAC;IAC9C,yBAAyB,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC;AAC1D,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { IdentityPlugin } from \"@azure/identity\";\nimport { NativeBrokerPlugin } from \"@azure/msal-node-extensions\";\n\n/**\n * A subset of the AzurePluginContext provided by \\@azure/identity\n *\n * @internal\n */\ninterface AzurePluginContext {\n nativeBrokerPluginControl: NativeBrokerPluginControl;\n}\n\ninterface NativeBrokerPluginControl {\n // eslint-disable-next-line @typescript-eslint/consistent-type-imports\n setNativeBroker(nativeBroker: import(\"@azure/msal-node\").INativeBrokerPlugin): void;\n}\n\n/**\n * A plugin that provides WAM Integration for `@azure/identity`\n * credentials. The plugin API is compatible with `@azure/identity` versions\n * 4.0.0 and later. Load this plugin using the `useIdentityPlugin`\n * function, imported from `@azure/identity`.\n *\n * Example:\n *\n * ```ts snippet:using_plugins\n * import { useIdentityPlugin, InteractiveBrowserCredential } from \"@azure/identity\";\n * import { nativeBrokerPlugin } from \"@azure/identity-broker\";\n *\n * useIdentityPlugin(nativeBrokerPlugin);\n * const credential = new InteractiveBrowserCredential({\n * brokerOptions: {\n * enabled: true,\n * parentWindowHandle: new Uint8Array(0), // This should be a handle to the parent window\n * },\n * });\n * ```\n */\nexport const nativeBrokerPlugin: IdentityPlugin = (context: unknown) => {\n const { nativeBrokerPluginControl } = context as AzurePluginContext;\n const brokerPlugin = new NativeBrokerPlugin();\n nativeBrokerPluginControl.setNativeBroker(brokerPlugin);\n};\n"]}
|
package/package.json
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azure/identity-broker",
|
|
3
|
-
"version": "1.1.1-alpha.
|
|
3
|
+
"version": "1.1.1-alpha.20241113.2",
|
|
4
4
|
"sdk-type": "client",
|
|
5
5
|
"description": "A native plugin for Azure Identity credentials to enable broker authentication such as WAM",
|
|
6
|
-
"main": "dist/index.js",
|
|
7
|
-
"module": "dist
|
|
8
|
-
"types": "./
|
|
6
|
+
"main": "./dist/commonjs/index.js",
|
|
7
|
+
"module": "./dist/esm/index.js",
|
|
8
|
+
"types": "./dist/commonjs/index.d.ts",
|
|
9
9
|
"scripts": {
|
|
10
|
-
"build": "npm run
|
|
10
|
+
"build": "npm run clean && dev-tool run build-package && dev-tool run extract-api",
|
|
11
11
|
"build:samples": "echo skipped",
|
|
12
|
-
"build:test": "
|
|
12
|
+
"build:test": "dev-tool run build-package && dev-tool run bundle",
|
|
13
13
|
"check-format": "dev-tool run vendored prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"",
|
|
14
14
|
"clean": "dev-tool run vendored rimraf --glob dist dist-esm types \"*.tgz\" \"*.log\"",
|
|
15
15
|
"execute:samples": "echo skipped",
|
|
16
|
-
"extract-api": "
|
|
16
|
+
"extract-api": "dev-tool run build-package && dev-tool run extract-api",
|
|
17
17
|
"format": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"",
|
|
18
18
|
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
|
|
19
19
|
"integration-test:browser": "echo skipped",
|
|
@@ -22,19 +22,16 @@
|
|
|
22
22
|
"lint:fix": "eslint package.json api-extractor.json README.md src test --fix --fix-type [problem,suggestion]",
|
|
23
23
|
"pack": "npm pack 2>&1",
|
|
24
24
|
"test": "npm run clean && npm run build:test && npm run unit-test && npm run integration-test",
|
|
25
|
-
"test:browser": "
|
|
25
|
+
"test:browser": "echo skipped",
|
|
26
26
|
"test:node": "npm run clean && npm run build:test && npm run unit-test:node && npm run integration-test:node",
|
|
27
27
|
"unit-test": "npm run unit-test:node && npm run unit-test:browser",
|
|
28
28
|
"unit-test:browser": "echo skipped",
|
|
29
|
-
"unit-test:node": "dev-tool run test:
|
|
29
|
+
"unit-test:node": "dev-tool run test:vitest -- --test-timeout 300000",
|
|
30
30
|
"update-snippets": "dev-tool run update-snippets",
|
|
31
31
|
"unit-test:manual": "dev-tool run test:node-ts-input -- --timeout 300000 'test/manual/node/popTokenSupport.spec.ts'"
|
|
32
32
|
},
|
|
33
33
|
"files": [
|
|
34
34
|
"dist/",
|
|
35
|
-
"dist-esm/identity/src",
|
|
36
|
-
"dist-esm/identity-broker/src",
|
|
37
|
-
"types/identity-broker.d.ts",
|
|
38
35
|
"README.md",
|
|
39
36
|
"LICENSE"
|
|
40
37
|
],
|
|
@@ -65,8 +62,8 @@
|
|
|
65
62
|
"tslib": "^2.2.0"
|
|
66
63
|
},
|
|
67
64
|
"devDependencies": {
|
|
68
|
-
"@azure-tools/test-recorder": "
|
|
69
|
-
"@azure-tools/test-utils": "
|
|
65
|
+
"@azure-tools/test-recorder": ">=4.1.0-alpha <4.1.0-alphb",
|
|
66
|
+
"@azure-tools/test-utils-vitest": ">=1.0.0-alpha <1.0.0-alphb",
|
|
70
67
|
"@azure/abort-controller": "^1.1.0",
|
|
71
68
|
"@azure/core-client": "^1.7.0",
|
|
72
69
|
"@azure/core-rest-pipeline": "^1.17.0",
|
|
@@ -74,14 +71,13 @@
|
|
|
74
71
|
"@azure/dev-tool": ">=1.0.0-alpha <1.0.0-alphb",
|
|
75
72
|
"@azure/eslint-plugin-azure-sdk": ">=3.0.0-alpha <3.0.0-alphb",
|
|
76
73
|
"@azure/logger": "^1.0.4",
|
|
77
|
-
"@types/mocha": "^10.0.0",
|
|
78
74
|
"@types/node": "^18.0.0",
|
|
79
|
-
"@
|
|
75
|
+
"@vitest/browser": "^2.1.4",
|
|
76
|
+
"@vitest/coverage-istanbul": "^2.1.4",
|
|
80
77
|
"eslint": "^9.9.0",
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
-
"typescript": "~5.6.2"
|
|
78
|
+
"playwright": "^1.48.2",
|
|
79
|
+
"typescript": "~5.6.2",
|
|
80
|
+
"vitest": "^2.1.4"
|
|
85
81
|
},
|
|
86
82
|
"//sampleConfiguration": {
|
|
87
83
|
"productName": "Azure Identity Brokered Auth Plugin",
|
|
@@ -92,5 +88,38 @@
|
|
|
92
88
|
"requiredResources": {
|
|
93
89
|
"Microsoft Entra App Registration": "https://learn.microsoft.com/azure/active-directory/develop/quickstart-register-app"
|
|
94
90
|
}
|
|
91
|
+
},
|
|
92
|
+
"type": "module",
|
|
93
|
+
"tshy": {
|
|
94
|
+
"exports": {
|
|
95
|
+
"./package.json": "./package.json",
|
|
96
|
+
".": "./src/index.ts"
|
|
97
|
+
},
|
|
98
|
+
"dialects": [
|
|
99
|
+
"esm",
|
|
100
|
+
"commonjs"
|
|
101
|
+
],
|
|
102
|
+
"esmDialects": [
|
|
103
|
+
"browser"
|
|
104
|
+
],
|
|
105
|
+
"selfLink": false
|
|
106
|
+
},
|
|
107
|
+
"browser": "./dist/browser/index.js",
|
|
108
|
+
"exports": {
|
|
109
|
+
"./package.json": "./package.json",
|
|
110
|
+
".": {
|
|
111
|
+
"browser": {
|
|
112
|
+
"types": "./dist/browser/index.d.ts",
|
|
113
|
+
"default": "./dist/browser/index.js"
|
|
114
|
+
},
|
|
115
|
+
"import": {
|
|
116
|
+
"types": "./dist/esm/index.d.ts",
|
|
117
|
+
"default": "./dist/esm/index.js"
|
|
118
|
+
},
|
|
119
|
+
"require": {
|
|
120
|
+
"types": "./dist/commonjs/index.d.ts",
|
|
121
|
+
"default": "./dist/commonjs/index.js"
|
|
122
|
+
}
|
|
123
|
+
}
|
|
95
124
|
}
|
|
96
125
|
}
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AzurePluginContext } from \"../../identity/src/plugins/provider\";\nimport type { IdentityPlugin } from \"@azure/identity\";\nimport { NativeBrokerPlugin } from \"@azure/msal-node-extensions\";\n\n/**\n * A plugin that provides WAM Integration for `@azure/identity`\n * credentials. The plugin API is compatible with `@azure/identity` versions\n * 4.0.0 and later. Load this plugin using the `useIdentityPlugin`\n * function, imported from `@azure/identity`.\n *\n * Example:\n *\n * ```ts snippet:using_plugins\n * import { useIdentityPlugin, InteractiveBrowserCredential } from \"@azure/identity\";\n * import { nativeBrokerPlugin } from \"@azure/identity-broker\";\n *\n * useIdentityPlugin(nativeBrokerPlugin);\n * const credential = new InteractiveBrowserCredential({\n * brokerOptions: {\n * enabled: true,\n * parentWindowHandle: new Uint8Array(0), // This should be a handle to the parent window\n * },\n * });\n * ```\n */\n\nexport const nativeBrokerPlugin: IdentityPlugin = (context: unknown) => {\n const { nativeBrokerPluginControl } = context as AzurePluginContext;\n const brokerPlugin = new NativeBrokerPlugin();\n nativeBrokerPluginControl.setNativeBroker(brokerPlugin);\n};\n"],"names":["NativeBrokerPlugin"],"mappings":";;;;;;AAAA;AACA;AAMA;;;;;;;;;;;;;;;;;;;;AAoBG;AAEU,MAAA,kBAAkB,GAAmB,CAAC,OAAgB,KAAI;AACrE,IAAA,MAAM,EAAE,yBAAyB,EAAE,GAAG,OAA6B;AACnE,IAAA,MAAM,YAAY,GAAG,IAAIA,qCAAkB,EAAE;AAC7C,IAAA,yBAAyB,CAAC,eAAe,CAAC,YAAY,CAAC;AACzD;;;;"}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT License.
|
|
3
|
-
/**
|
|
4
|
-
* Current version of the `@azure/identity` package.
|
|
5
|
-
*/
|
|
6
|
-
export const SDK_VERSION = `4.5.1`;
|
|
7
|
-
/**
|
|
8
|
-
* The default client ID for authentication
|
|
9
|
-
* @internal
|
|
10
|
-
*/
|
|
11
|
-
// TODO: temporary - this is the Azure CLI clientID - we'll replace it when
|
|
12
|
-
// Developer Sign On application is available
|
|
13
|
-
// https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/Constants.cs#L9
|
|
14
|
-
export const DeveloperSignOnClientId = "04b07795-8ddb-461a-bbee-02f9e1bf7b46";
|
|
15
|
-
/**
|
|
16
|
-
* The default tenant for authentication
|
|
17
|
-
* @internal
|
|
18
|
-
*/
|
|
19
|
-
export const DefaultTenantId = "common";
|
|
20
|
-
/**
|
|
21
|
-
* A list of known Azure authority hosts
|
|
22
|
-
*/
|
|
23
|
-
export var AzureAuthorityHosts;
|
|
24
|
-
(function (AzureAuthorityHosts) {
|
|
25
|
-
/**
|
|
26
|
-
* China-based Azure Authority Host
|
|
27
|
-
*/
|
|
28
|
-
AzureAuthorityHosts["AzureChina"] = "https://login.chinacloudapi.cn";
|
|
29
|
-
/**
|
|
30
|
-
* Germany-based Azure Authority Host
|
|
31
|
-
*
|
|
32
|
-
* @deprecated Microsoft Cloud Germany was closed on October 29th, 2021.
|
|
33
|
-
*
|
|
34
|
-
* */
|
|
35
|
-
AzureAuthorityHosts["AzureGermany"] = "https://login.microsoftonline.de";
|
|
36
|
-
/**
|
|
37
|
-
* US Government Azure Authority Host
|
|
38
|
-
*/
|
|
39
|
-
AzureAuthorityHosts["AzureGovernment"] = "https://login.microsoftonline.us";
|
|
40
|
-
/**
|
|
41
|
-
* Public Cloud Azure Authority Host
|
|
42
|
-
*/
|
|
43
|
-
AzureAuthorityHosts["AzurePublicCloud"] = "https://login.microsoftonline.com";
|
|
44
|
-
})(AzureAuthorityHosts || (AzureAuthorityHosts = {}));
|
|
45
|
-
/**
|
|
46
|
-
* @internal
|
|
47
|
-
* The default authority host.
|
|
48
|
-
*/
|
|
49
|
-
export const DefaultAuthorityHost = AzureAuthorityHosts.AzurePublicCloud;
|
|
50
|
-
/**
|
|
51
|
-
* @internal
|
|
52
|
-
* Allow acquiring tokens for any tenant for multi-tentant auth.
|
|
53
|
-
*/
|
|
54
|
-
export const ALL_TENANTS = ["*"];
|
|
55
|
-
/**
|
|
56
|
-
* @internal
|
|
57
|
-
*/
|
|
58
|
-
export const CACHE_CAE_SUFFIX = "cae";
|
|
59
|
-
/**
|
|
60
|
-
* @internal
|
|
61
|
-
*/
|
|
62
|
-
export const CACHE_NON_CAE_SUFFIX = "nocae";
|
|
63
|
-
/**
|
|
64
|
-
* @internal
|
|
65
|
-
*
|
|
66
|
-
* The default name for the cache persistence plugin.
|
|
67
|
-
* Matches the constant defined in the cache persistence package.
|
|
68
|
-
*/
|
|
69
|
-
export const DEFAULT_TOKEN_CACHE_NAME = "msal.cache";
|
|
70
|
-
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../identity/src/constants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,OAAO,CAAC;AAEnC;;;GAGG;AACH,2EAA2E;AAC3E,6CAA6C;AAC7C,uGAAuG;AACvG,MAAM,CAAC,MAAM,uBAAuB,GAAG,sCAAsC,CAAC;AAE9E;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,QAAQ,CAAC;AAExC;;GAEG;AACH,MAAM,CAAN,IAAY,mBAoBX;AApBD,WAAY,mBAAmB;IAC7B;;OAEG;IACH,oEAA6C,CAAA;IAC7C;;;;;SAKK;IACL,wEAAiD,CAAA;IACjD;;OAEG;IACH,2EAAoD,CAAA;IACpD;;OAEG;IACH,6EAAsD,CAAA;AACxD,CAAC,EApBW,mBAAmB,KAAnB,mBAAmB,QAoB9B;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,mBAAmB,CAAC,gBAAgB,CAAC;AAEzE;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAAa,CAAC,GAAG,CAAC,CAAC;AAE3C;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,CAAC;AAEtC;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,OAAO,CAAC;AAE5C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,YAAY,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Current version of the `@azure/identity` package.\n */\nexport const SDK_VERSION = `4.5.1`;\n\n/**\n * The default client ID for authentication\n * @internal\n */\n// TODO: temporary - this is the Azure CLI clientID - we'll replace it when\n// Developer Sign On application is available\n// https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/Constants.cs#L9\nexport const DeveloperSignOnClientId = \"04b07795-8ddb-461a-bbee-02f9e1bf7b46\";\n\n/**\n * The default tenant for authentication\n * @internal\n */\nexport const DefaultTenantId = \"common\";\n\n/**\n * A list of known Azure authority hosts\n */\nexport enum AzureAuthorityHosts {\n /**\n * China-based Azure Authority Host\n */\n AzureChina = \"https://login.chinacloudapi.cn\",\n /**\n * Germany-based Azure Authority Host\n *\n * @deprecated Microsoft Cloud Germany was closed on October 29th, 2021.\n *\n * */\n AzureGermany = \"https://login.microsoftonline.de\",\n /**\n * US Government Azure Authority Host\n */\n AzureGovernment = \"https://login.microsoftonline.us\",\n /**\n * Public Cloud Azure Authority Host\n */\n AzurePublicCloud = \"https://login.microsoftonline.com\",\n}\n\n/**\n * @internal\n * The default authority host.\n */\nexport const DefaultAuthorityHost = AzureAuthorityHosts.AzurePublicCloud;\n\n/**\n * @internal\n * Allow acquiring tokens for any tenant for multi-tentant auth.\n */\nexport const ALL_TENANTS: string[] = [\"*\"];\n\n/**\n * @internal\n */\nexport const CACHE_CAE_SUFFIX = \"cae\";\n\n/**\n * @internal\n */\nexport const CACHE_NON_CAE_SUFFIX = \"nocae\";\n\n/**\n * @internal\n *\n * The default name for the cache persistence plugin.\n * Matches the constant defined in the cache persistence package.\n */\nexport const DEFAULT_TOKEN_CACHE_NAME = \"msal.cache\";\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"visualStudioCodeCredentialPlugin.js","sourceRoot":"","sources":["../../../../../identity/src/credentials/visualStudioCodeCredentialPlugin.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * A function that searches for credentials in the Visual Studio Code credential store.\n *\n * @returns an array of credentials (username and password)\n * @internal\n */\nexport type VSCodeCredentialFinder = () => Promise<Array<{ account: string; password: string }>>;\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tokenCachePersistenceOptions.js","sourceRoot":"","sources":["../../../../../../identity/src/msal/nodeFlows/tokenCachePersistenceOptions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Parameters that enable token cache persistence in the Identity credentials.\n */\nexport interface TokenCachePersistenceOptions {\n /**\n * If set to true, persistent token caching will be enabled for this credential instance.\n */\n enabled: boolean;\n /**\n * Unique identifier for the persistent token cache.\n *\n * Based on this identifier, the persistence file will be located in any of the following places:\n * - Darwin: '/Users/user/.IdentityService/<name>'\n * - Windows 8+: 'C:\\\\Users\\\\user\\\\AppData\\\\Local\\\\.IdentityService\\\\<name>'\n * - Linux: '/home/user/.IdentityService/<name>'\n */\n name?: string;\n /**\n * If set to true, the cache will be stored without encryption if no OS level user encryption is available.\n * When set to false, the PersistentTokenCache will throw an error if no OS level user encryption is available.\n */\n unsafeAllowUnencryptedStorage?: boolean;\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"provider.js","sourceRoot":"","sources":["../../../../../identity/src/plugins/provider.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { TokenCachePersistenceOptions } from \"../msal/nodeFlows/tokenCachePersistenceOptions\";\nimport type { VSCodeCredentialFinder } from \"../credentials/visualStudioCodeCredentialPlugin\";\n\n/**\n * The type of an Azure Identity plugin, a function accepting a plugin\n * context.\n */\nexport type IdentityPlugin = (context: unknown) => void;\n\n/**\n * Plugin context entries for controlling cache plugins.\n */\nexport interface CachePluginControl {\n setPersistence(\n persistenceFactory: (\n options?: TokenCachePersistenceOptions,\n ) => Promise<import(\"@azure/msal-node\").ICachePlugin>,\n ): void;\n}\n\nexport interface NativeBrokerPluginControl {\n setNativeBroker(nativeBroker: import(\"@azure/msal-node\").INativeBrokerPlugin): void;\n}\n\n/**\n * Plugin context entries for controlling VisualStudioCodeCredential.\n */\nexport interface VisualStudioCodeCredentialControl {\n setVsCodeCredentialFinder(finder: VSCodeCredentialFinder): void;\n}\n\n/**\n * Context options passed to a plugin during initialization.\n *\n * Plugin authors are responsible for casting their plugin context values\n * to this type.\n *\n * @internal\n */\nexport interface AzurePluginContext {\n cachePluginControl: CachePluginControl;\n nativeBrokerPluginControl: NativeBrokerPluginControl;\n vsCodeCredentialControl: VisualStudioCodeCredentialControl;\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAEjE;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,MAAM,CAAC,MAAM,kBAAkB,GAAmB,CAAC,OAAgB,EAAE,EAAE;IACrE,MAAM,EAAE,yBAAyB,EAAE,GAAG,OAA6B,CAAC;IACpE,MAAM,YAAY,GAAG,IAAI,kBAAkB,EAAE,CAAC;IAC9C,yBAAyB,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC;AAC1D,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AzurePluginContext } from \"../../identity/src/plugins/provider\";\nimport type { IdentityPlugin } from \"@azure/identity\";\nimport { NativeBrokerPlugin } from \"@azure/msal-node-extensions\";\n\n/**\n * A plugin that provides WAM Integration for `@azure/identity`\n * credentials. The plugin API is compatible with `@azure/identity` versions\n * 4.0.0 and later. Load this plugin using the `useIdentityPlugin`\n * function, imported from `@azure/identity`.\n *\n * Example:\n *\n * ```ts snippet:using_plugins\n * import { useIdentityPlugin, InteractiveBrowserCredential } from \"@azure/identity\";\n * import { nativeBrokerPlugin } from \"@azure/identity-broker\";\n *\n * useIdentityPlugin(nativeBrokerPlugin);\n * const credential = new InteractiveBrowserCredential({\n * brokerOptions: {\n * enabled: true,\n * parentWindowHandle: new Uint8Array(0), // This should be a handle to the parent window\n * },\n * });\n * ```\n */\n\nexport const nativeBrokerPlugin: IdentityPlugin = (context: unknown) => {\n const { nativeBrokerPluginControl } = context as AzurePluginContext;\n const brokerPlugin = new NativeBrokerPlugin();\n nativeBrokerPluginControl.setNativeBroker(brokerPlugin);\n};\n"]}
|
|
File without changes
|
|
File without changes
|