@azure/msal-node-extensions 1.0.0-alpha.9 → 1.0.0-beta.0

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.
Files changed (117) hide show
  1. package/README.md +174 -8
  2. package/bin/arm64/dpapi.node +0 -0
  3. package/bin/ia32/dpapi.node +0 -0
  4. package/bin/x64/dpapi.node +0 -0
  5. package/dist/{dpapi-addon/Dpapi.d.ts → Dpapi.d.ts} +4 -4
  6. package/dist/Dpapi.esm.js +24 -0
  7. package/dist/Dpapi.esm.js.map +1 -0
  8. package/dist/Dpapi.js +24 -0
  9. package/dist/Dpapi.js.map +1 -0
  10. package/dist/broker/NativeBrokerPlugin.d.ts +20 -0
  11. package/dist/broker/NativeBrokerPlugin.esm.js +408 -0
  12. package/dist/broker/NativeBrokerPlugin.esm.js.map +1 -0
  13. package/dist/broker/NativeBrokerPlugin.js +410 -0
  14. package/dist/broker/NativeBrokerPlugin.js.map +1 -0
  15. package/dist/error/NativeAuthError.d.ts +6 -0
  16. package/dist/error/NativeAuthError.esm.js +20 -0
  17. package/dist/error/NativeAuthError.esm.js.map +1 -0
  18. package/dist/error/NativeAuthError.js +22 -0
  19. package/dist/error/NativeAuthError.js.map +1 -0
  20. package/dist/error/PersistenceError.esm.js +89 -0
  21. package/dist/error/PersistenceError.esm.js.map +1 -0
  22. package/{src/error/PersistenceError.ts → dist/error/PersistenceError.js} +23 -33
  23. package/dist/error/PersistenceError.js.map +1 -0
  24. package/dist/index.d.ts +1 -0
  25. package/dist/index.esm.js +12 -0
  26. package/dist/index.esm.js.map +1 -0
  27. package/dist/index.js +24 -6
  28. package/dist/index.js.map +1 -0
  29. package/dist/lock/CrossPlatformLock.esm.js +94 -0
  30. package/dist/lock/CrossPlatformLock.esm.js.map +1 -0
  31. package/dist/lock/CrossPlatformLock.js +96 -0
  32. package/dist/lock/CrossPlatformLock.js.map +1 -0
  33. package/dist/lock/CrossPlatformLockOptions.d.ts +1 -1
  34. package/dist/packageMetadata.d.ts +2 -0
  35. package/dist/packageMetadata.esm.js +8 -0
  36. package/dist/packageMetadata.esm.js.map +1 -0
  37. package/dist/packageMetadata.js +11 -0
  38. package/dist/packageMetadata.js.map +1 -0
  39. package/{src/persistence/BasePersistence.ts → dist/persistence/BasePersistence.esm.js} +18 -23
  40. package/dist/persistence/BasePersistence.esm.js.map +1 -0
  41. package/dist/persistence/BasePersistence.js +38 -0
  42. package/dist/persistence/BasePersistence.js.map +1 -0
  43. package/dist/persistence/DataProtectionScope.d.ts +5 -4
  44. package/{src/persistence/DataProtectionScope.ts → dist/persistence/DataProtectionScope.esm.js} +9 -5
  45. package/dist/persistence/DataProtectionScope.esm.js.map +1 -0
  46. package/dist/persistence/DataProtectionScope.js +26 -0
  47. package/dist/persistence/DataProtectionScope.js.map +1 -0
  48. package/dist/persistence/FilePersistence.d.ts +1 -0
  49. package/dist/persistence/FilePersistence.esm.js +173 -0
  50. package/dist/persistence/FilePersistence.esm.js.map +1 -0
  51. package/dist/persistence/FilePersistence.js +175 -0
  52. package/dist/persistence/FilePersistence.js.map +1 -0
  53. package/dist/persistence/FilePersistenceWithDataProtection.esm.js +84 -0
  54. package/dist/persistence/FilePersistenceWithDataProtection.esm.js.map +1 -0
  55. package/dist/persistence/FilePersistenceWithDataProtection.js +86 -0
  56. package/dist/persistence/FilePersistenceWithDataProtection.js.map +1 -0
  57. package/dist/persistence/IPersistenceConfiguration.d.ts +2 -0
  58. package/dist/persistence/KeychainPersistence.d.ts +2 -2
  59. package/dist/persistence/KeychainPersistence.esm.js +90 -0
  60. package/dist/persistence/KeychainPersistence.esm.js.map +1 -0
  61. package/dist/persistence/KeychainPersistence.js +92 -0
  62. package/dist/persistence/KeychainPersistence.js.map +1 -0
  63. package/dist/persistence/LibSecretPersistence.d.ts +2 -2
  64. package/dist/persistence/LibSecretPersistence.esm.js +91 -0
  65. package/dist/persistence/LibSecretPersistence.esm.js.map +1 -0
  66. package/dist/persistence/LibSecretPersistence.js +93 -0
  67. package/dist/persistence/LibSecretPersistence.js.map +1 -0
  68. package/dist/persistence/PersistenceCachePlugin.d.ts +1 -1
  69. package/{src/persistence/PersistenceCachePlugin.ts → dist/persistence/PersistenceCachePlugin.esm.js} +27 -34
  70. package/dist/persistence/PersistenceCachePlugin.esm.js.map +1 -0
  71. package/dist/persistence/PersistenceCachePlugin.js +101 -0
  72. package/dist/persistence/PersistenceCachePlugin.js.map +1 -0
  73. package/dist/persistence/PersistenceCreator.d.ts +1 -1
  74. package/dist/persistence/PersistenceCreator.esm.js +63 -0
  75. package/dist/persistence/PersistenceCreator.esm.js.map +1 -0
  76. package/dist/persistence/PersistenceCreator.js +65 -0
  77. package/dist/persistence/PersistenceCreator.js.map +1 -0
  78. package/dist/utils/Constants.d.ts +12 -5
  79. package/{src/utils/Constants.ts → dist/utils/Constants.esm.js} +17 -17
  80. package/dist/utils/Constants.esm.js.map +1 -0
  81. package/dist/utils/Constants.js +66 -0
  82. package/dist/utils/Constants.js.map +1 -0
  83. package/dist/utils/Environment.d.ts +1 -1
  84. package/{src/utils/Environment.ts → dist/utils/Environment.esm.js} +44 -49
  85. package/dist/utils/Environment.esm.js.map +1 -0
  86. package/dist/utils/Environment.js +96 -0
  87. package/dist/utils/Environment.js.map +1 -0
  88. package/dist/utils/TypeGuards.d.ts +5 -0
  89. package/dist/utils/TypeGuards.esm.js +16 -0
  90. package/dist/utils/TypeGuards.esm.js.map +1 -0
  91. package/dist/utils/TypeGuards.js +18 -0
  92. package/dist/utils/TypeGuards.js.map +1 -0
  93. package/package.json +70 -52
  94. package/CHANGELOG.json +0 -167
  95. package/binding.gyp +0 -29
  96. package/changelog.md +0 -77
  97. package/dist/msal-node-extensions.cjs.development.js +0 -902
  98. package/dist/msal-node-extensions.cjs.development.js.map +0 -1
  99. package/dist/msal-node-extensions.cjs.production.min.js +0 -2
  100. package/dist/msal-node-extensions.cjs.production.min.js.map +0 -1
  101. package/dist/msal-node-extensions.esm.js +0 -902
  102. package/dist/msal-node-extensions.esm.js.map +0 -1
  103. package/src/dpapi-addon/Dpapi.ts +0 -12
  104. package/src/dpapi-addon/dpapi_addon.h +0 -6
  105. package/src/dpapi-addon/dpapi_not_supported.cpp +0 -19
  106. package/src/dpapi-addon/dpapi_win.cpp +0 -114
  107. package/src/dpapi-addon/main.cpp +0 -32
  108. package/src/index.ts +0 -16
  109. package/src/lock/CrossPlatformLock.ts +0 -89
  110. package/src/lock/CrossPlatformLockOptions.ts +0 -15
  111. package/src/persistence/FilePersistence.ts +0 -140
  112. package/src/persistence/FilePersistenceWithDataProtection.ts +0 -92
  113. package/src/persistence/IPersistence.ts +0 -17
  114. package/src/persistence/IPersistenceConfiguration.ts +0 -14
  115. package/src/persistence/KeychainPersistence.ts +0 -86
  116. package/src/persistence/LibSecretPersistence.ts +0 -87
  117. package/src/persistence/PersistenceCreator.ts +0 -73
package/README.md CHANGED
@@ -1,5 +1,36 @@
1
1
  # Microsoft Authentication Extensions for Node
2
- The Microsoft Authentication Extensions for Node offers secure mechanisms for client applications to perform cross-platform token cache serialization and persistence. It gives additional support to the Microsoft Authentication Library for Node (MSAL).
2
+
3
+ ![npm (scoped)](https://img.shields.io/npm/v/@azure/msal-node-extensions)
4
+ ![npm](https://img.shields.io/npm/dw/@azure/msal-node-extensions)
5
+
6
+ | <a href="https://docs.microsoft.com/azure/active-directory/develop/tutorial-v2-react" target="blank">Getting Started</a> | <a href="https://aka.ms/aaddevv2" target="_blank">AAD Docs</a> | <a href="https://azuread.github.io/microsoft-authentication-library-for-js/ref/modules/_azure_msal_react.html" target="_blank">Library Reference</a> | <a href="https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/samples" target="blank">Samples</a>
7
+ |--- | --- | --- | --- |
8
+
9
+ 1. [About](#about)
10
+ - [Cache Persistence](#cache-persistence)
11
+ - [Brokering](#brokering)
12
+ 1. [FAQ](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/extensions/docs/faq.md)
13
+ 1. [Changelog](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/extensions/msal-node-extensions/CHANGELOG.md)
14
+ 1. [Prerequisites](#prerequisites)
15
+ 1. [Installation](#installation)
16
+ 1. [Usage - Cache Persistence](#usage---cache-persistence)
17
+ 1. [Usage - Brokering](#usage---brokering)
18
+ 1. [Build and Test](#build-and-test)
19
+ - [Build package](#building-the-package-locally)
20
+ - [Test package](#running-tests)
21
+ 1. [Samples](#samples)
22
+ 1. [Security Reporting](#security-reporting)
23
+ 1. [License](#license)
24
+ 1. [Contributing](#contributing)
25
+ 1. [Code of Conduct](#we-value-and-adhere-to-the-microsoft-open-source-code-of-conduct)
26
+
27
+ ## About
28
+ The `msal-node-extensions` library offers optional features to enhance the capabilities of `msal-node`:
29
+
30
+ - Secure mechanisms for client applications to perform cross-platform token cache serialization and persistence
31
+ - An interface for acquiring tokens from the native token broker, enabling a higher level of security and SSO with other native applications
32
+
33
+ ### Cache Persistence
3
34
 
4
35
  [MSAL Node](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-node) supports an in-memory cache by default and provides the ICachePlugin interface to perform cache serialization, but does not provide a default way of storing the token cache to disk. Microsoft authentication extensions for node is default implementation for persisting cache to disk across different platforms.
5
36
 
@@ -11,10 +42,15 @@ Supported platforms are Windows, Mac and Linux:
11
42
 
12
43
  > Note: It is recommended to use this library for cache persistence support for Public client applications such as Desktop apps only. In web applications, this may lead to scale and performance issues. Web applications are recommended to persist the cache in session.
13
44
 
14
- ## Building
45
+ ### Brokering
15
46
 
16
- The extensions contain prebuild binaries.
17
- [node-gyp](https://github.com/nodejs/node-gyp) is used to compile addons for accessing system APIs. Installation requirements are listed on the [node-gyp README](https://github.com/nodejs/node-gyp#installation)
47
+ When using the native broker, refresh tokens are bound to the device on which they are acquired on and are not accessible by `msal-node` or the application. This provides a higher level of security that cannot be achieved by `msal-node` alone. More information about token brokering can be found [here](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-node/docs/brokering.md)
48
+
49
+ ## Prerequisites
50
+
51
+ The `msal-node-extensions` library ships with pre-compiled binaries.
52
+
53
+ > Note: If you are planning to do local development on msal-node-extensions itself you may need to install some additional tools. [node-gyp](https://github.com/nodejs/node-gyp) is used to compile [addons](https://nodejs.org/api/addons.html) for accessing system APIs. Installation requirements are listed on the [node-gyp README](https://github.com/nodejs/node-gyp#installation)
18
54
 
19
55
  On linux, the library uses `libsecret` so you may need to install it. Depending on your distribution, you will need to run the following command:
20
56
 
@@ -22,10 +58,136 @@ On linux, the library uses `libsecret` so you may need to install it. Depending
22
58
  - Red Hat-based: `sudo yum install libsecret-devel`
23
59
  - Arch Linux: sudo `pacman -S libsecret`
24
60
 
25
- To build msal-node-extensions:
26
- - Navigate to `extensions/msal-node-extensions`
27
- - Run `npm install`
28
- - Run `npm run build`
61
+ ## Installation
62
+
63
+ The `msal-node-extensions` package is available on NPM.
64
+
65
+ ```bash
66
+ npm i @azure/msal-node-extensions --save
67
+ ```
68
+ ## Usage - Cache Persistence
69
+
70
+ ### Getting started
71
+ Here is a code snippet on how to configure the token cache.
72
+
73
+ ```js
74
+ const {
75
+ DataProtectionScope,
76
+ Environment,
77
+ PersistenceCreator,
78
+ PersistenceCachePlugin,
79
+ } = require("@azure/msal-node-extensions");
80
+
81
+ // You can use the helper functions provided through the Environment class to construct your cache path
82
+ // The helper functions provide consistent implementations across Windows, Mac and Linux.
83
+ const cachePath = path.join(Environment.getUserRootDirectory(), "./cache.json");
84
+
85
+ const persistenceConfiguration = {
86
+ cachePath,
87
+ dataProtectionScope: DataProtectionScope.CurrentUser,
88
+ serviceName: "<SERVICE-NAME>",
89
+ accountName: "<ACCOUNT-NAME>",
90
+ usePlaintextFileOnLinux: false,
91
+ }
92
+
93
+ // The PersistenceCreator obfuscates a lot of the complexity by doing the following actions for you :-
94
+ // 1. Detects the environment the application is running on and initializes the right persistence instance for the environment.
95
+ // 2. Performs persistence validation for you.
96
+ // 3. Performs any fallbacks if necessary.
97
+ PersistenceCreator
98
+ .createPersistence(persistenceConfiguration)
99
+ .then(async (persistence) => {
100
+ const publicClientConfig = {
101
+ auth: {
102
+ clientId: "<CLIENT-ID>",
103
+ authority: "<AUTHORITY>",
104
+ },
105
+
106
+ // This hooks up the cross-platform cache into MSAL
107
+ cache: {
108
+ cachePlugin: new PersistenceCachePlugin(persistence)
109
+ }
110
+ };
111
+
112
+ const pca = new msal.PublicClientApplication(publicClientConfig);
113
+
114
+ // Use the public client application as required...
115
+ });
116
+ ```
117
+
118
+ All the arguments for the persistence configuration are explained below:
119
+ | Field Name | Description | Required For |
120
+ | ---------- | ----------- | ------------ |
121
+ | cachePath | This is the path to the lock file the library uses to synchronize the reads and the writes | Windows, Mac and Linux |
122
+ | dataProtectionScope | Specifies the scope of the data protection on Windows either the current user or the local machine. | Windows |
123
+ | serviceName | This specifies the service name to be used on Mac and/or Linux | Mac and Linux |
124
+ | accountName | This specifies the account name to be used on Mac and/or Linux | Mac and Linux |
125
+ | usePlaintextFileOnLinux | This is a flag to default to plain text on linux if libsecret fails. Defaults to `false` | Linux |
126
+
127
+ ### Security boundary
128
+ On Windows and Linux, the token cache is scoped to the user session, i.e. all applications running on behalf of the user can access the cache. Mac offers a more restricted scope, ensuring that only the application that created the cache can access it, and prompting the user if others apps want access.
129
+
130
+ ## Usage - Brokering
131
+
132
+ Enabling token brokering requires just one new configuration parameter:
133
+
134
+ ```javascript
135
+ import { PublicClientApplication, Configuration } from "@azure/msal-node";
136
+ import { NativeBrokerPlugin } from "@azure/msal-node-extensions";
137
+
138
+ const msalConfig: Configuration = {
139
+ auth: {
140
+ clientId: "your-client-id"
141
+ },
142
+ broker: {
143
+ nativeBrokerPlugin: new NativeBrokerPlugin()
144
+ }
145
+ };
146
+
147
+ const pca = new PublicClientApplication(msalConfig);
148
+ ```
149
+
150
+ More detailed information can be found in the [brokering documentation](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-node/docs/brokering.md)
151
+
152
+ ## Build and Test
153
+
154
+ If you intend to contribute to the library visit the [`contributing section`](#contributing) for even more information on how.
155
+
156
+ ### Building the package locally
157
+
158
+ To build both the `@azure/msal-node-extensions` library and `@azure/msal-common` libraries, run the following commands:
159
+
160
+ ```bash
161
+ // Install dev dependencies from root of repo
162
+ npm install
163
+ // Change to the msal-node-extensions package directory
164
+ cd lib/msal-node-extensions/
165
+ // Build msal-common and msal-node-extensions
166
+ npm run build:all
167
+ ```
168
+
169
+ ### Running Tests
170
+
171
+ `@azure/msal-node-extensions` uses [jest](https://jestjs.io/) to run unit tests and coverage.
172
+
173
+ ```bash
174
+ // To run tests
175
+ npm test
176
+ ```
177
+
178
+ ## Samples
179
+
180
+ - [Auth Code CLI sample with Cache Persistence](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/extensions/samples/msal-node-extensions). This can be run on Windows, Mac and Linux.
181
+ - [Electron sample with Cache Persistence](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/extensions/samples/electron-webpack)
182
+ - [Brokering sample](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/samples/msal-node-samples/auth-code-cli-brokered-app)
183
+
184
+ ## Security Reporting
185
+
186
+ If you find a security issue with our libraries or services please report it to [secure@microsoft.com](mailto:secure@microsoft.com) with as much detail as possible. Your submission may be eligible for a bounty through the [Microsoft Bounty](http://aka.ms/bugbounty) program. Please do not post security issues to GitHub Issues or any other public site. We will contact you shortly upon receiving the information. We encourage you to get notifications of when security incidents occur by visiting [this page](https://technet.microsoft.com/security/dd252948) and subscribing to Security Advisory Alerts.
187
+
188
+ ## License
189
+
190
+ Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License.
29
191
 
30
192
  ## Contributing
31
193
 
@@ -40,3 +202,7 @@ provided by the bot. You will only need to do this once across all repos using o
40
202
  This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
41
203
  For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
42
204
  contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
205
+
206
+ ## We Value and Adhere to the Microsoft Open Source Code of Conduct
207
+
208
+ This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
Binary file
Binary file
Binary file
@@ -1,6 +1,6 @@
1
1
  export interface DpapiBindings {
2
- protectData(dataToEncrypt: Uint8Array, optionalEntropy: Uint8Array, scope: string): Uint8Array;
3
- unprotectData(encryptData: Uint8Array, optionalEntropy: Uint8Array, scope: string): Uint8Array;
2
+ protectData(dataToEncrypt: Uint8Array, optionalEntropy: Uint8Array | null, scope: string): Uint8Array;
3
+ unprotectData(encryptData: Uint8Array, optionalEntropy: Uint8Array | null, scope: string): Uint8Array;
4
4
  }
5
- export declare var Dpapi: DpapiBindings;
6
- export default Dpapi;
5
+ declare let Dpapi: DpapiBindings;
6
+ export { Dpapi };
@@ -0,0 +1,24 @@
1
+ /*! @azure/msal-node-extensions v1.0.0-beta.0 2023-06-20 */
2
+ 'use strict';
3
+ /*
4
+ * Copyright (c) Microsoft Corporation. All rights reserved.
5
+ * Licensed under the MIT License.
6
+ */
7
+ class defaultDpapi {
8
+ protectData() {
9
+ throw new Error("Dpapi is not supported on this platform");
10
+ }
11
+ unprotectData() {
12
+ throw new Error("Dpapi is not supported on this platform");
13
+ }
14
+ }
15
+ let Dpapi;
16
+ if (process.platform !== "win32") {
17
+ Dpapi = new defaultDpapi();
18
+ }
19
+ else {
20
+ Dpapi = require(`../bin/${process.arch}/dpapi`);
21
+ }
22
+
23
+ export { Dpapi };
24
+ //# sourceMappingURL=Dpapi.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Dpapi.esm.js","sources":["../src/Dpapi.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;;;AAGG;AAOH,MAAM,YAAY,CAAA;IACd,WAAW,GAAA;AACP,QAAA,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAC;KAC9D;IACD,aAAa,GAAA;AACT,QAAA,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAC;KAC9D;AACJ,CAAA;AAED,IAAI,MAAqB;AACzB,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE;AAC9B,IAAA,KAAK,GAAG,IAAI,YAAY,EAAE,CAAC;AAC9B,CAAA;AAAM,KAAA;IACH,KAAK,GAAG,OAAO,CAAC,CAAA,OAAA,EAAU,OAAO,CAAC,IAAI,CAAQ,MAAA,CAAA,CAAC,CAAC;AACnD;;;;"}
package/dist/Dpapi.js ADDED
@@ -0,0 +1,24 @@
1
+ /*! @azure/msal-node-extensions v1.0.0-beta.0 2023-06-20 */
2
+ 'use strict';
3
+ 'use strict';
4
+
5
+ /*
6
+ * Copyright (c) Microsoft Corporation. All rights reserved.
7
+ * Licensed under the MIT License.
8
+ */
9
+ class defaultDpapi {
10
+ protectData() {
11
+ throw new Error("Dpapi is not supported on this platform");
12
+ }
13
+ unprotectData() {
14
+ throw new Error("Dpapi is not supported on this platform");
15
+ }
16
+ }
17
+ exports.Dpapi = void 0;
18
+ if (process.platform !== "win32") {
19
+ exports.Dpapi = new defaultDpapi();
20
+ }
21
+ else {
22
+ exports.Dpapi = require(`../bin/${process.arch}/dpapi`);
23
+ }
24
+ //# sourceMappingURL=Dpapi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Dpapi.js","sources":["../src/Dpapi.ts"],"sourcesContent":[null],"names":["Dpapi"],"mappings":";;;;AAAA;;;AAGG;AAOH,MAAM,YAAY,CAAA;IACd,WAAW,GAAA;AACP,QAAA,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAC;KAC9D;IACD,aAAa,GAAA;AACT,QAAA,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAC;KAC9D;AACJ,CAAA;AAEGA,uBAAqB;AACzB,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE;AAC9B,IAAAA,aAAK,GAAG,IAAI,YAAY,EAAE,CAAC;AAC9B,CAAA;AAAM,KAAA;IACHA,aAAK,GAAG,OAAO,CAAC,CAAA,OAAA,EAAU,OAAO,CAAC,IAAI,CAAQ,MAAA,CAAA,CAAC,CAAC;AACnD;;"}
@@ -0,0 +1,20 @@
1
+ /// <reference types="node" />
2
+ import { AccountInfo, AuthenticationResult, INativeBrokerPlugin, LoggerOptions, NativeRequest, NativeSignOutRequest } from "@azure/msal-common";
3
+ export declare class NativeBrokerPlugin implements INativeBrokerPlugin {
4
+ private logger;
5
+ isBrokerAvailable: boolean;
6
+ constructor();
7
+ setLogger(loggerOptions: LoggerOptions): void;
8
+ getAccountById(accountId: string, correlationId: string): Promise<AccountInfo>;
9
+ getAllAccounts(clientId: string, correlationId: string): Promise<AccountInfo[]>;
10
+ acquireTokenSilent(request: NativeRequest): Promise<AuthenticationResult>;
11
+ acquireTokenInteractive(request: NativeRequest, providedWindowHandle?: Buffer): Promise<AuthenticationResult>;
12
+ signOut(request: NativeSignOutRequest): Promise<void>;
13
+ private getAccount;
14
+ private readAccountById;
15
+ private generateRequestParameters;
16
+ private getAuthenticationResult;
17
+ private generateAccountInfo;
18
+ private isMsalRuntimeError;
19
+ private wrapError;
20
+ }