@azure/identity-broker 1.1.1-alpha.20241230.2 → 1.1.1-alpha.20250106.1
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 +7 -0
- package/dist/browser/index.d.ts +1 -0
- package/dist/browser/index.d.ts.map +1 -1
- package/dist/browser/index.js +1 -0
- package/dist/browser/index.js.map +1 -1
- package/dist/commonjs/index.d.ts +1 -0
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/commonjs/index.js +1 -0
- package/dist/commonjs/index.js.map +1 -1
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -61,6 +61,7 @@ import { useIdentityPlugin, InteractiveBrowserCredential } from "@azure/identity
|
|
|
61
61
|
import { nativeBrokerPlugin } from "@azure/identity-broker";
|
|
62
62
|
|
|
63
63
|
useIdentityPlugin(nativeBrokerPlugin);
|
|
64
|
+
|
|
64
65
|
const credential = new InteractiveBrowserCredential({
|
|
65
66
|
brokerOptions: {
|
|
66
67
|
enabled: true,
|
|
@@ -80,14 +81,17 @@ import { useIdentityPlugin, InteractiveBrowserCredential } from "@azure/identity
|
|
|
80
81
|
import { nativeBrokerPlugin } from "@azure/identity-broker";
|
|
81
82
|
|
|
82
83
|
useIdentityPlugin(nativeBrokerPlugin);
|
|
84
|
+
|
|
83
85
|
const credential = new InteractiveBrowserCredential({
|
|
84
86
|
brokerOptions: {
|
|
85
87
|
enabled: true,
|
|
86
88
|
parentWindowHandle: new Uint8Array(0), // This should be a handle to the parent window
|
|
87
89
|
},
|
|
88
90
|
});
|
|
91
|
+
|
|
89
92
|
// We'll use the Microsoft Graph scope as an example
|
|
90
93
|
const scope = "https://graph.microsoft.com/.default";
|
|
94
|
+
|
|
91
95
|
// Print out part of the access token
|
|
92
96
|
console.log((await credential.getToken(scope)).token.substring(0, 10), "...");
|
|
93
97
|
```
|
|
@@ -103,6 +107,7 @@ import { useIdentityPlugin, InteractiveBrowserCredential } from "@azure/identity
|
|
|
103
107
|
import { nativeBrokerPlugin } from "@azure/identity-broker";
|
|
104
108
|
|
|
105
109
|
useIdentityPlugin(nativeBrokerPlugin);
|
|
110
|
+
|
|
106
111
|
const credential = new InteractiveBrowserCredential({
|
|
107
112
|
brokerOptions: {
|
|
108
113
|
enabled: true,
|
|
@@ -110,8 +115,10 @@ const credential = new InteractiveBrowserCredential({
|
|
|
110
115
|
parentWindowHandle: new Uint8Array(0), // This should be a handle to the parent window
|
|
111
116
|
},
|
|
112
117
|
});
|
|
118
|
+
|
|
113
119
|
// We'll use the Microsoft Graph scope as an example
|
|
114
120
|
const scope = "https://graph.microsoft.com/.default";
|
|
121
|
+
|
|
115
122
|
// Print out part of the access token
|
|
116
123
|
console.log((await credential.getToken(scope)).token.substr(0, 10), "...");
|
|
117
124
|
```
|
package/dist/browser/index.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ import type { IdentityPlugin } from "@azure/identity";
|
|
|
12
12
|
* import { nativeBrokerPlugin } from "@azure/identity-broker";
|
|
13
13
|
*
|
|
14
14
|
* useIdentityPlugin(nativeBrokerPlugin);
|
|
15
|
+
*
|
|
15
16
|
* const credential = new InteractiveBrowserCredential({
|
|
16
17
|
* brokerOptions: {
|
|
17
18
|
* enabled: true,
|
|
@@ -1 +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
|
|
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"}
|
package/dist/browser/index.js
CHANGED
|
@@ -14,6 +14,7 @@ import { NativeBrokerPlugin } from "@azure/msal-node-extensions";
|
|
|
14
14
|
* import { nativeBrokerPlugin } from "@azure/identity-broker";
|
|
15
15
|
*
|
|
16
16
|
* useIdentityPlugin(nativeBrokerPlugin);
|
|
17
|
+
*
|
|
17
18
|
* const credential = new InteractiveBrowserCredential({
|
|
18
19
|
* brokerOptions: {
|
|
19
20
|
* enabled: true,
|
|
@@ -1 +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
|
|
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"]}
|
package/dist/commonjs/index.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ import type { IdentityPlugin } from "@azure/identity";
|
|
|
12
12
|
* import { nativeBrokerPlugin } from "@azure/identity-broker";
|
|
13
13
|
*
|
|
14
14
|
* useIdentityPlugin(nativeBrokerPlugin);
|
|
15
|
+
*
|
|
15
16
|
* const credential = new InteractiveBrowserCredential({
|
|
16
17
|
* brokerOptions: {
|
|
17
18
|
* enabled: true,
|
|
@@ -1 +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
|
|
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"}
|
package/dist/commonjs/index.js
CHANGED
|
@@ -17,6 +17,7 @@ const msal_node_extensions_1 = require("@azure/msal-node-extensions");
|
|
|
17
17
|
* import { nativeBrokerPlugin } from "@azure/identity-broker";
|
|
18
18
|
*
|
|
19
19
|
* useIdentityPlugin(nativeBrokerPlugin);
|
|
20
|
+
*
|
|
20
21
|
* const credential = new InteractiveBrowserCredential({
|
|
21
22
|
* brokerOptions: {
|
|
22
23
|
* enabled: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAGlC,sEAAiE;AAgBjE
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAGlC,sEAAiE;AAgBjE;;;;;;;;;;;;;;;;;;;;;GAqBG;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 *\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/dist/esm/index.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ import type { IdentityPlugin } from "@azure/identity";
|
|
|
12
12
|
* import { nativeBrokerPlugin } from "@azure/identity-broker";
|
|
13
13
|
*
|
|
14
14
|
* useIdentityPlugin(nativeBrokerPlugin);
|
|
15
|
+
*
|
|
15
16
|
* const credential = new InteractiveBrowserCredential({
|
|
16
17
|
* brokerOptions: {
|
|
17
18
|
* enabled: true,
|
package/dist/esm/index.d.ts.map
CHANGED
|
@@ -1 +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
|
|
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"}
|
package/dist/esm/index.js
CHANGED
|
@@ -14,6 +14,7 @@ import { NativeBrokerPlugin } from "@azure/msal-node-extensions";
|
|
|
14
14
|
* import { nativeBrokerPlugin } from "@azure/identity-broker";
|
|
15
15
|
*
|
|
16
16
|
* useIdentityPlugin(nativeBrokerPlugin);
|
|
17
|
+
*
|
|
17
18
|
* const credential = new InteractiveBrowserCredential({
|
|
18
19
|
* brokerOptions: {
|
|
19
20
|
* enabled: true,
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +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
|
|
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"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azure/identity-broker",
|
|
3
|
-
"version": "1.1.1-alpha.
|
|
3
|
+
"version": "1.1.1-alpha.20250106.1",
|
|
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",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"unit-test": "npm run unit-test:node && npm run unit-test:browser",
|
|
28
28
|
"unit-test:browser": "echo skipped",
|
|
29
29
|
"unit-test:node": "dev-tool run test:vitest -- --test-timeout 300000",
|
|
30
|
-
"
|
|
31
|
-
"
|
|
30
|
+
"unit-test:manual": "dev-tool run test:node-ts-input -- --timeout 300000 'test/manual/node/popTokenSupport.spec.ts'",
|
|
31
|
+
"update-snippets": "dev-tool run update-snippets"
|
|
32
32
|
},
|
|
33
33
|
"files": [
|
|
34
34
|
"dist/",
|