@azure/identity-broker 1.2.1-alpha.20250618.1 → 1.2.1-alpha.20250717.4

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/README.md CHANGED
@@ -72,6 +72,17 @@ const credential = new InteractiveBrowserCredential({
72
72
 
73
73
  After calling `useIdentityPlugin`, the native broker plugin is registered to the `@azure/identity` package and will be available on the `InteractiveBrowserCredential` that supports WAM broker authentication. This credential has `brokerOptions` in the constructor options.
74
74
 
75
+ **Notes**: As of `@azure/identity` version 4.11.0-beta.1, `DefaultAzureCredential` provides support to sign-in via the Windows Web Account Manager. Enable native broker in your program as follows:
76
+
77
+ ```ts snippet:using_plugins_dac
78
+ import { useIdentityPlugin, DefaultAzureCredential } from "@azure/identity";
79
+ import { nativeBrokerPlugin } from "@azure/identity-broker";
80
+
81
+ useIdentityPlugin(nativeBrokerPlugin);
82
+
83
+ const credential = new DefaultAzureCredential();
84
+ ```
85
+
75
86
  ## Examples
76
87
 
77
88
  Once the plugin is registered, you can enable WAM broker authentication by passing `brokerOptions` with an `enabled` property set to `true` to a credential constructor. In the following example, we use the `InteractiveBrowserCredential`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azure/identity-broker",
3
- "version": "1.2.1-alpha.20250618.1",
3
+ "version": "1.2.1-alpha.20250717.4",
4
4
  "sdk-type": "client",
5
5
  "description": "A native plugin for Azure Identity credentials to enable broker authentication such as WAM",
6
6
  "main": "./dist/commonjs/index.js",
@@ -66,10 +66,8 @@
66
66
  "@azure/eslint-plugin-azure-sdk": ">=3.0.0-alpha <3.0.0-alphb",
67
67
  "@azure/logger": "^1.0.4",
68
68
  "@types/node": "^20.0.0",
69
- "@vitest/browser": "^3.0.9",
70
69
  "@vitest/coverage-istanbul": "^3.0.9",
71
70
  "eslint": "^9.9.0",
72
- "playwright": "^1.48.2",
73
71
  "typescript": "~5.8.2",
74
72
  "vitest": "^3.0.9"
75
73
  },
@@ -93,20 +91,12 @@
93
91
  "esm",
94
92
  "commonjs"
95
93
  ],
96
- "esmDialects": [
97
- "browser"
98
- ],
99
94
  "selfLink": false,
100
95
  "project": "./tsconfig.src.json"
101
96
  },
102
- "browser": "./dist/browser/index.js",
103
97
  "exports": {
104
98
  "./package.json": "./package.json",
105
99
  ".": {
106
- "browser": {
107
- "types": "./dist/browser/index.d.ts",
108
- "default": "./dist/browser/index.js"
109
- },
110
100
  "import": {
111
101
  "types": "./dist/esm/index.d.ts",
112
102
  "default": "./dist/esm/index.js"
@@ -1,25 +0,0 @@
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
- *
16
- * const credential = new InteractiveBrowserCredential({
17
- * brokerOptions: {
18
- * enabled: true,
19
- * parentWindowHandle: new Uint8Array(0), // This should be a handle to the parent window
20
- * },
21
- * });
22
- * ```
23
- */
24
- export declare const nativeBrokerPlugin: IdentityPlugin;
25
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAiBtD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,kBAAkB,EAAE,cAIhC,CAAC"}
@@ -1,31 +0,0 @@
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
- *
18
- * const credential = new InteractiveBrowserCredential({
19
- * brokerOptions: {
20
- * enabled: true,
21
- * parentWindowHandle: new Uint8Array(0), // This should be a handle to the parent window
22
- * },
23
- * });
24
- * ```
25
- */
26
- export const nativeBrokerPlugin = (context) => {
27
- const { nativeBrokerPluginControl } = context;
28
- const brokerPlugin = new NativeBrokerPlugin();
29
- nativeBrokerPluginControl.setNativeBroker(brokerPlugin);
30
- };
31
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
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;;;;;;;;;;;;;;;;;;;;;GAqBG;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 *\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"]}
@@ -1,3 +0,0 @@
1
- {
2
- "type": "module"
3
- }