@azure/msal-node 2.0.2 → 2.2.0-alpha.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 (218) hide show
  1. package/README.md +3 -1
  2. package/dist/cache/ITokenCache.d.ts +15 -15
  3. package/dist/cache/NodeStorage.cjs +401 -401
  4. package/dist/cache/NodeStorage.cjs.map +1 -1
  5. package/dist/cache/NodeStorage.d.ts +182 -182
  6. package/dist/cache/NodeStorage.d.ts.map +1 -1
  7. package/dist/cache/NodeStorage.mjs +401 -401
  8. package/dist/cache/NodeStorage.mjs.map +1 -1
  9. package/dist/cache/TokenCache.cjs +265 -269
  10. package/dist/cache/TokenCache.cjs.map +1 -1
  11. package/dist/cache/TokenCache.d.ts +90 -90
  12. package/dist/cache/TokenCache.d.ts.map +1 -1
  13. package/dist/cache/TokenCache.mjs +266 -270
  14. package/dist/cache/TokenCache.mjs.map +1 -1
  15. package/dist/cache/distributed/DistributedCachePlugin.cjs +26 -26
  16. package/dist/cache/distributed/DistributedCachePlugin.cjs.map +1 -1
  17. package/dist/cache/distributed/DistributedCachePlugin.d.ts +10 -10
  18. package/dist/cache/distributed/DistributedCachePlugin.d.ts.map +1 -1
  19. package/dist/cache/distributed/DistributedCachePlugin.mjs +26 -26
  20. package/dist/cache/distributed/DistributedCachePlugin.mjs.map +1 -1
  21. package/dist/cache/distributed/ICacheClient.d.ts +17 -17
  22. package/dist/cache/distributed/IPartitionManager.d.ts +28 -28
  23. package/dist/cache/serializer/Deserializer.cjs +173 -175
  24. package/dist/cache/serializer/Deserializer.cjs.map +1 -1
  25. package/dist/cache/serializer/Deserializer.d.ts +42 -42
  26. package/dist/cache/serializer/Deserializer.d.ts.map +1 -1
  27. package/dist/cache/serializer/Deserializer.mjs +174 -176
  28. package/dist/cache/serializer/Deserializer.mjs.map +1 -1
  29. package/dist/cache/serializer/Serializer.cjs +134 -134
  30. package/dist/cache/serializer/Serializer.cjs.map +1 -1
  31. package/dist/cache/serializer/Serializer.d.ts +39 -39
  32. package/dist/cache/serializer/Serializer.d.ts.map +1 -1
  33. package/dist/cache/serializer/Serializer.mjs +134 -134
  34. package/dist/cache/serializer/Serializer.mjs.map +1 -1
  35. package/dist/cache/serializer/SerializerTypes.d.ts +101 -101
  36. package/dist/client/ClientApplication.cjs +333 -333
  37. package/dist/client/ClientApplication.cjs.map +1 -1
  38. package/dist/client/ClientApplication.d.ts +142 -142
  39. package/dist/client/ClientApplication.d.ts.map +1 -1
  40. package/dist/client/ClientApplication.mjs +334 -334
  41. package/dist/client/ClientApplication.mjs.map +1 -1
  42. package/dist/client/ClientAssertion.cjs +116 -116
  43. package/dist/client/ClientAssertion.cjs.map +1 -1
  44. package/dist/client/ClientAssertion.d.ts +46 -46
  45. package/dist/client/ClientAssertion.d.ts.map +1 -1
  46. package/dist/client/ClientAssertion.mjs +117 -117
  47. package/dist/client/ClientAssertion.mjs.map +1 -1
  48. package/dist/client/ClientCredentialClient.cjs +189 -168
  49. package/dist/client/ClientCredentialClient.cjs.map +1 -1
  50. package/dist/client/ClientCredentialClient.d.ts +33 -33
  51. package/dist/client/ClientCredentialClient.d.ts.map +1 -1
  52. package/dist/client/ClientCredentialClient.mjs +190 -169
  53. package/dist/client/ClientCredentialClient.mjs.map +1 -1
  54. package/dist/client/ConfidentialClientApplication.cjs +163 -164
  55. package/dist/client/ConfidentialClientApplication.cjs.map +1 -1
  56. package/dist/client/ConfidentialClientApplication.d.ts +58 -58
  57. package/dist/client/ConfidentialClientApplication.d.ts.map +1 -1
  58. package/dist/client/ConfidentialClientApplication.mjs +164 -165
  59. package/dist/client/ConfidentialClientApplication.mjs.map +1 -1
  60. package/dist/client/DeviceCodeClient.cjs +207 -207
  61. package/dist/client/DeviceCodeClient.cjs.map +1 -1
  62. package/dist/client/DeviceCodeClient.d.ts +53 -53
  63. package/dist/client/DeviceCodeClient.d.ts.map +1 -1
  64. package/dist/client/DeviceCodeClient.mjs +208 -208
  65. package/dist/client/DeviceCodeClient.mjs.map +1 -1
  66. package/dist/client/IConfidentialClientApplication.d.ts +39 -39
  67. package/dist/client/IConfidentialClientApplication.d.ts.map +1 -1
  68. package/dist/client/IPublicClientApplication.d.ts +42 -42
  69. package/dist/client/IPublicClientApplication.d.ts.map +1 -1
  70. package/dist/client/OnBehalfOfClient.cjs +203 -204
  71. package/dist/client/OnBehalfOfClient.cjs.map +1 -1
  72. package/dist/client/OnBehalfOfClient.d.ts +47 -47
  73. package/dist/client/OnBehalfOfClient.d.ts.map +1 -1
  74. package/dist/client/OnBehalfOfClient.mjs +204 -205
  75. package/dist/client/OnBehalfOfClient.mjs.map +1 -1
  76. package/dist/client/PublicClientApplication.cjs +229 -175
  77. package/dist/client/PublicClientApplication.cjs.map +1 -1
  78. package/dist/client/PublicClientApplication.d.ts +71 -65
  79. package/dist/client/PublicClientApplication.d.ts.map +1 -1
  80. package/dist/client/PublicClientApplication.mjs +232 -178
  81. package/dist/client/PublicClientApplication.mjs.map +1 -1
  82. package/dist/client/UsernamePasswordClient.cjs +95 -95
  83. package/dist/client/UsernamePasswordClient.cjs.map +1 -1
  84. package/dist/client/UsernamePasswordClient.d.ts +25 -25
  85. package/dist/client/UsernamePasswordClient.d.ts.map +1 -1
  86. package/dist/client/UsernamePasswordClient.mjs +95 -95
  87. package/dist/client/UsernamePasswordClient.mjs.map +1 -1
  88. package/dist/config/Configuration.cjs +72 -72
  89. package/dist/config/Configuration.cjs.map +1 -1
  90. package/dist/config/Configuration.d.ts +107 -107
  91. package/dist/config/Configuration.mjs +72 -72
  92. package/dist/config/Configuration.mjs.map +1 -1
  93. package/dist/crypto/CryptoProvider.cjs +75 -75
  94. package/dist/crypto/CryptoProvider.cjs.map +1 -1
  95. package/dist/crypto/CryptoProvider.d.ts +52 -52
  96. package/dist/crypto/CryptoProvider.mjs +75 -75
  97. package/dist/crypto/CryptoProvider.mjs.map +1 -1
  98. package/dist/crypto/GuidGenerator.cjs +22 -22
  99. package/dist/crypto/GuidGenerator.cjs.map +1 -1
  100. package/dist/crypto/GuidGenerator.d.ts +14 -14
  101. package/dist/crypto/GuidGenerator.mjs +22 -22
  102. package/dist/crypto/GuidGenerator.mjs.map +1 -1
  103. package/dist/crypto/HashUtils.cjs +13 -13
  104. package/dist/crypto/HashUtils.cjs.map +1 -1
  105. package/dist/crypto/HashUtils.d.ts +8 -8
  106. package/dist/crypto/HashUtils.mjs +13 -13
  107. package/dist/crypto/HashUtils.mjs.map +1 -1
  108. package/dist/crypto/PkceGenerator.cjs +49 -49
  109. package/dist/crypto/PkceGenerator.cjs.map +1 -1
  110. package/dist/crypto/PkceGenerator.d.ts +22 -22
  111. package/dist/crypto/PkceGenerator.mjs +49 -49
  112. package/dist/crypto/PkceGenerator.mjs.map +1 -1
  113. package/dist/error/NodeAuthError.cjs +85 -85
  114. package/dist/error/NodeAuthError.cjs.map +1 -1
  115. package/dist/error/NodeAuthError.d.ts +65 -65
  116. package/dist/error/NodeAuthError.mjs +85 -85
  117. package/dist/error/NodeAuthError.mjs.map +1 -1
  118. package/dist/index.cjs +17 -1
  119. package/dist/index.cjs.map +1 -1
  120. package/dist/index.d.ts +42 -42
  121. package/dist/index.d.ts.map +1 -1
  122. package/dist/index.mjs +2 -2
  123. package/dist/internals.cjs +8 -8
  124. package/dist/internals.cjs.map +1 -1
  125. package/dist/internals.d.ts +6 -6
  126. package/dist/internals.d.ts.map +1 -1
  127. package/dist/internals.mjs +8 -8
  128. package/dist/internals.mjs.map +1 -1
  129. package/dist/network/HttpClient.cjs +277 -276
  130. package/dist/network/HttpClient.cjs.map +1 -1
  131. package/dist/network/HttpClient.d.ts +25 -25
  132. package/dist/network/HttpClient.d.ts.map +1 -1
  133. package/dist/network/HttpClient.mjs +278 -277
  134. package/dist/network/HttpClient.mjs.map +1 -1
  135. package/dist/network/ILoopbackClient.d.ts +10 -10
  136. package/dist/network/LoopbackClient.cjs +75 -84
  137. package/dist/network/LoopbackClient.cjs.map +1 -1
  138. package/dist/network/LoopbackClient.d.ts +21 -21
  139. package/dist/network/LoopbackClient.d.ts.map +1 -1
  140. package/dist/network/LoopbackClient.mjs +77 -86
  141. package/dist/network/LoopbackClient.mjs.map +1 -1
  142. package/dist/packageMetadata.cjs +4 -4
  143. package/dist/packageMetadata.cjs.map +1 -1
  144. package/dist/packageMetadata.d.ts +2 -2
  145. package/dist/packageMetadata.mjs +4 -4
  146. package/dist/packageMetadata.mjs.map +1 -1
  147. package/dist/request/AuthorizationCodeRequest.d.ts +21 -21
  148. package/dist/request/AuthorizationUrlRequest.d.ts +33 -33
  149. package/dist/request/ClientCredentialRequest.d.ts +14 -14
  150. package/dist/request/DeviceCodeRequest.d.ts +15 -15
  151. package/dist/request/InteractiveRequest.d.ts +22 -22
  152. package/dist/request/InteractiveRequest.d.ts.map +1 -1
  153. package/dist/request/OnBehalfOfRequest.d.ts +14 -14
  154. package/dist/request/RefreshTokenRequest.d.ts +17 -17
  155. package/dist/request/SignOutRequest.d.ts +5 -5
  156. package/dist/request/SilentFlowRequest.d.ts +16 -16
  157. package/dist/request/UsernamePasswordRequest.d.ts +19 -19
  158. package/dist/utils/Constants.cjs +80 -90
  159. package/dist/utils/Constants.cjs.map +1 -1
  160. package/dist/utils/Constants.d.ts +86 -96
  161. package/dist/utils/Constants.d.ts.map +1 -1
  162. package/dist/utils/Constants.mjs +81 -90
  163. package/dist/utils/Constants.mjs.map +1 -1
  164. package/dist/utils/EncodingUtils.cjs +44 -44
  165. package/dist/utils/EncodingUtils.cjs.map +1 -1
  166. package/dist/utils/EncodingUtils.d.ts +26 -26
  167. package/dist/utils/EncodingUtils.mjs +44 -44
  168. package/dist/utils/EncodingUtils.mjs.map +1 -1
  169. package/dist/utils/NetworkUtils.cjs +38 -38
  170. package/dist/utils/NetworkUtils.cjs.map +1 -1
  171. package/dist/utils/NetworkUtils.d.ts +5 -5
  172. package/dist/utils/NetworkUtils.mjs +38 -38
  173. package/dist/utils/NetworkUtils.mjs.map +1 -1
  174. package/package.json +8 -5
  175. package/src/cache/ITokenCache.ts +24 -0
  176. package/src/cache/NodeStorage.ts +533 -0
  177. package/src/cache/TokenCache.ts +358 -0
  178. package/src/cache/distributed/DistributedCachePlugin.ts +56 -0
  179. package/src/cache/distributed/ICacheClient.ts +23 -0
  180. package/src/cache/distributed/IPartitionManager.ts +35 -0
  181. package/src/cache/serializer/Deserializer.ts +218 -0
  182. package/src/cache/serializer/Serializer.ts +173 -0
  183. package/src/cache/serializer/SerializerTypes.ts +121 -0
  184. package/src/client/ClientApplication.ts +596 -0
  185. package/src/client/ClientAssertion.ts +165 -0
  186. package/src/client/ClientCredentialClient.ts +346 -0
  187. package/src/client/ConfidentialClientApplication.ts +268 -0
  188. package/src/client/DeviceCodeClient.ts +369 -0
  189. package/src/client/IConfidentialClientApplication.ts +72 -0
  190. package/src/client/IPublicClientApplication.ts +72 -0
  191. package/src/client/OnBehalfOfClient.ts +368 -0
  192. package/src/client/PublicClientApplication.ts +339 -0
  193. package/src/client/UsernamePasswordClient.ts +180 -0
  194. package/src/config/Configuration.ts +201 -0
  195. package/src/crypto/CryptoProvider.ts +98 -0
  196. package/src/crypto/GuidGenerator.ts +28 -0
  197. package/src/crypto/HashUtils.ts +17 -0
  198. package/src/crypto/PkceGenerator.ts +63 -0
  199. package/src/error/NodeAuthError.ts +117 -0
  200. package/src/index.ts +125 -0
  201. package/src/internals.ts +12 -0
  202. package/src/network/HttpClient.ts +425 -0
  203. package/src/network/ILoopbackClient.ts +19 -0
  204. package/src/network/LoopbackClient.ts +110 -0
  205. package/src/packageMetadata.ts +3 -0
  206. package/src/request/AuthorizationCodeRequest.ts +39 -0
  207. package/src/request/AuthorizationUrlRequest.ts +50 -0
  208. package/src/request/ClientCredentialRequest.ts +29 -0
  209. package/src/request/DeviceCodeRequest.ts +34 -0
  210. package/src/request/InteractiveRequest.ts +39 -0
  211. package/src/request/OnBehalfOfRequest.ts +30 -0
  212. package/src/request/RefreshTokenRequest.ts +34 -0
  213. package/src/request/SignOutRequest.ts +11 -0
  214. package/src/request/SilentFlowRequest.ts +32 -0
  215. package/src/request/UsernamePasswordRequest.ts +36 -0
  216. package/src/utils/Constants.ts +103 -0
  217. package/src/utils/EncodingUtils.ts +50 -0
  218. package/src/utils/NetworkUtils.ts +49 -0
@@ -1,186 +1,240 @@
1
- /*! @azure/msal-node v2.0.2 2023-08-18 */
1
+ /*! @azure/msal-node v2.2.0-alpha.0 2023-09-20 */
2
2
  'use strict';
3
- import { ApiId, Constants } from '../utils/Constants.mjs';
4
- import { AuthError, ServerError, OIDC_DEFAULT_SCOPES, ResponseMode, CodeChallengeMethodValues, Constants as Constants$1 } from '@azure/msal-common';
3
+ import { ApiId, LOOPBACK_SERVER_CONSTANTS, Constants as Constants$1 } from '../utils/Constants.mjs';
4
+ import { AuthError, OIDC_DEFAULT_SCOPES, ResponseMode, CodeChallengeMethodValues, ServerError, Constants } from '@azure/msal-common';
5
5
  import { ClientApplication } from './ClientApplication.mjs';
6
- import { NodeAuthError } from '../error/NodeAuthError.mjs';
6
+ import { NodeAuthError, NodeAuthErrorMessage } from '../error/NodeAuthError.mjs';
7
7
  import { LoopbackClient } from '../network/LoopbackClient.mjs';
8
8
  import { DeviceCodeClient } from './DeviceCodeClient.mjs';
9
9
 
10
- /*
11
- * Copyright (c) Microsoft Corporation. All rights reserved.
12
- * Licensed under the MIT License.
13
- */
14
- /**
15
- * This class is to be used to acquire tokens for public client applications (desktop, mobile). Public client applications
16
- * are not trusted to safely store application secrets, and therefore can only request tokens in the name of an user.
17
- * @public
18
- */
19
- class PublicClientApplication extends ClientApplication {
20
- /**
21
- * Important attributes in the Configuration object for auth are:
22
- * - clientID: the application ID of your application. You can obtain one by registering your application with our Application registration portal.
23
- * - authority: the authority URL for your application.
24
- *
25
- * AAD authorities are of the form https://login.microsoftonline.com/\{Enter_the_Tenant_Info_Here\}.
26
- * - If your application supports Accounts in one organizational directory, replace "Enter_the_Tenant_Info_Here" value with the Tenant Id or Tenant name (for example, contoso.microsoft.com).
27
- * - If your application supports Accounts in any organizational directory, replace "Enter_the_Tenant_Info_Here" value with organizations.
28
- * - If your application supports Accounts in any organizational directory and personal Microsoft accounts, replace "Enter_the_Tenant_Info_Here" value with common.
29
- * - To restrict support to Personal Microsoft accounts only, replace "Enter_the_Tenant_Info_Here" value with consumers.
30
- *
31
- * Azure B2C authorities are of the form https://\{instance\}/\{tenant\}/\{policy\}. Each policy is considered
32
- * its own authority. You will have to set the all of the knownAuthorities at the time of the client application
33
- * construction.
34
- *
35
- * ADFS authorities are of the form https://\{instance\}/adfs.
36
- */
37
- constructor(configuration) {
38
- super(configuration);
39
- if (this.config.broker.nativeBrokerPlugin) {
40
- if (this.config.broker.nativeBrokerPlugin.isBrokerAvailable) {
41
- this.nativeBrokerPlugin = this.config.broker.nativeBrokerPlugin;
42
- this.nativeBrokerPlugin.setLogger(this.config.system.loggerOptions);
43
- }
44
- else {
45
- this.logger.warning("NativeBroker implementation was provided but the broker is unavailable.");
46
- }
47
- }
48
- }
49
- /**
50
- * Acquires a token from the authority using OAuth2.0 device code flow.
51
- * This flow is designed for devices that do not have access to a browser or have input constraints.
52
- * The authorization server issues a DeviceCode object with a verification code, an end-user code,
53
- * and the end-user verification URI. The DeviceCode object is provided through a callback, and the end-user should be
54
- * instructed to use another device to navigate to the verification URI to input credentials.
55
- * Since the client cannot receive incoming requests, it polls the authorization server repeatedly
56
- * until the end-user completes input of credentials.
57
- */
58
- async acquireTokenByDeviceCode(request) {
59
- this.logger.info("acquireTokenByDeviceCode called", request.correlationId);
60
- const validRequest = Object.assign(request, await this.initializeBaseRequest(request));
61
- const serverTelemetryManager = this.initializeServerTelemetryManager(ApiId.acquireTokenByDeviceCode, validRequest.correlationId);
62
- try {
63
- const deviceCodeConfig = await this.buildOauthClientConfiguration(validRequest.authority, validRequest.correlationId, serverTelemetryManager, undefined, request.azureCloudOptions);
64
- const deviceCodeClient = new DeviceCodeClient(deviceCodeConfig);
65
- this.logger.verbose("Device code client created", validRequest.correlationId);
66
- return deviceCodeClient.acquireToken(validRequest);
67
- }
68
- catch (e) {
69
- if (e instanceof AuthError) {
70
- e.setCorrelationId(validRequest.correlationId);
71
- }
72
- serverTelemetryManager.cacheFailedRequest(e);
73
- throw e;
74
- }
75
- }
76
- /**
77
- * Acquires a token interactively via the browser by requesting an authorization code then exchanging it for a token.
78
- */
79
- async acquireTokenInteractive(request) {
80
- const correlationId = request.correlationId || this.cryptoProvider.createNewGuid();
81
- this.logger.trace("acquireTokenInteractive called", correlationId);
82
- const { openBrowser, successTemplate, errorTemplate, windowHandle, loopbackClient: customLoopbackClient, ...remainingProperties } = request;
83
- if (this.nativeBrokerPlugin) {
84
- const brokerRequest = {
85
- ...remainingProperties,
86
- clientId: this.config.auth.clientId,
87
- scopes: request.scopes || OIDC_DEFAULT_SCOPES,
88
- redirectUri: `${Constants.HTTP_PROTOCOL}${Constants.LOCALHOST}`,
89
- authority: request.authority || this.config.auth.authority,
90
- correlationId: correlationId,
91
- extraParameters: {
92
- ...remainingProperties.extraQueryParameters,
93
- ...remainingProperties.tokenQueryParameters,
94
- },
95
- accountId: remainingProperties.account?.nativeAccountId,
96
- };
97
- return this.nativeBrokerPlugin.acquireTokenInteractive(brokerRequest, windowHandle);
98
- }
99
- const { verifier, challenge } = await this.cryptoProvider.generatePkceCodes();
100
- const loopbackClient = customLoopbackClient || new LoopbackClient();
101
- const authCodeListener = loopbackClient.listenForAuthCode(successTemplate, errorTemplate);
102
- const redirectUri = loopbackClient.getRedirectUri();
103
- const validRequest = {
104
- ...remainingProperties,
105
- correlationId: correlationId,
106
- scopes: request.scopes || OIDC_DEFAULT_SCOPES,
107
- redirectUri: redirectUri,
108
- responseMode: ResponseMode.QUERY,
109
- codeChallenge: challenge,
110
- codeChallengeMethod: CodeChallengeMethodValues.S256,
111
- };
112
- const authCodeUrl = await this.getAuthCodeUrl(validRequest);
113
- await openBrowser(authCodeUrl);
114
- const authCodeResponse = await authCodeListener.finally(() => {
115
- loopbackClient.closeServer();
116
- });
117
- if (authCodeResponse.error) {
118
- throw new ServerError(authCodeResponse.error, authCodeResponse.error_description, authCodeResponse.suberror);
119
- }
120
- else if (!authCodeResponse.code) {
121
- throw NodeAuthError.createNoAuthCodeInResponseError();
122
- }
123
- const clientInfo = authCodeResponse.client_info;
124
- const tokenRequest = {
125
- code: authCodeResponse.code,
126
- codeVerifier: verifier,
127
- clientInfo: clientInfo || Constants$1.EMPTY_STRING,
128
- ...validRequest,
129
- };
130
- return this.acquireTokenByCode(tokenRequest);
131
- }
132
- /**
133
- * Returns a token retrieved either from the cache or by exchanging the refresh token for a fresh access token. If brokering is enabled the token request will be serviced by the broker.
134
- * @param request
135
- * @returns
136
- */
137
- async acquireTokenSilent(request) {
138
- const correlationId = request.correlationId || this.cryptoProvider.createNewGuid();
139
- this.logger.trace("acquireTokenSilent called", correlationId);
140
- if (this.nativeBrokerPlugin) {
141
- const brokerRequest = {
142
- ...request,
143
- clientId: this.config.auth.clientId,
144
- scopes: request.scopes || OIDC_DEFAULT_SCOPES,
145
- redirectUri: `${Constants.HTTP_PROTOCOL}${Constants.LOCALHOST}`,
146
- authority: request.authority || this.config.auth.authority,
147
- correlationId: correlationId,
148
- extraParameters: request.tokenQueryParameters,
149
- accountId: request.account.nativeAccountId,
150
- forceRefresh: request.forceRefresh || false,
151
- };
152
- return this.nativeBrokerPlugin.acquireTokenSilent(brokerRequest);
153
- }
154
- return super.acquireTokenSilent(request);
155
- }
156
- /**
157
- * Removes cache artifacts associated with the given account
158
- * @param request
159
- * @returns
160
- */
161
- async signOut(request) {
162
- if (this.nativeBrokerPlugin && request.account.nativeAccountId) {
163
- const signoutRequest = {
164
- clientId: this.config.auth.clientId,
165
- accountId: request.account.nativeAccountId,
166
- correlationId: request.correlationId ||
167
- this.cryptoProvider.createNewGuid(),
168
- };
169
- await this.nativeBrokerPlugin.signOut(signoutRequest);
170
- }
171
- await this.getTokenCache().removeAccount(request.account);
172
- }
173
- /**
174
- * Returns all cached accounts for this application. If brokering is enabled this request will be serviced by the broker.
175
- * @returns
176
- */
177
- async getAllAccounts() {
178
- if (this.nativeBrokerPlugin) {
179
- const correlationId = this.cryptoProvider.createNewGuid();
180
- return this.nativeBrokerPlugin.getAllAccounts(this.config.auth.clientId, correlationId);
181
- }
182
- return this.getTokenCache().getAllAccounts();
183
- }
10
+ /*
11
+ * Copyright (c) Microsoft Corporation. All rights reserved.
12
+ * Licensed under the MIT License.
13
+ */
14
+ /**
15
+ * This class is to be used to acquire tokens for public client applications (desktop, mobile). Public client applications
16
+ * are not trusted to safely store application secrets, and therefore can only request tokens in the name of an user.
17
+ * @public
18
+ */
19
+ class PublicClientApplication extends ClientApplication {
20
+ /**
21
+ * Important attributes in the Configuration object for auth are:
22
+ * - clientID: the application ID of your application. You can obtain one by registering your application with our Application registration portal.
23
+ * - authority: the authority URL for your application.
24
+ *
25
+ * AAD authorities are of the form https://login.microsoftonline.com/\{Enter_the_Tenant_Info_Here\}.
26
+ * - If your application supports Accounts in one organizational directory, replace "Enter_the_Tenant_Info_Here" value with the Tenant Id or Tenant name (for example, contoso.microsoft.com).
27
+ * - If your application supports Accounts in any organizational directory, replace "Enter_the_Tenant_Info_Here" value with organizations.
28
+ * - If your application supports Accounts in any organizational directory and personal Microsoft accounts, replace "Enter_the_Tenant_Info_Here" value with common.
29
+ * - To restrict support to Personal Microsoft accounts only, replace "Enter_the_Tenant_Info_Here" value with consumers.
30
+ *
31
+ * Azure B2C authorities are of the form https://\{instance\}/\{tenant\}/\{policy\}. Each policy is considered
32
+ * its own authority. You will have to set the all of the knownAuthorities at the time of the client application
33
+ * construction.
34
+ *
35
+ * ADFS authorities are of the form https://\{instance\}/adfs.
36
+ */
37
+ constructor(configuration) {
38
+ super(configuration);
39
+ if (this.config.broker.nativeBrokerPlugin) {
40
+ if (this.config.broker.nativeBrokerPlugin.isBrokerAvailable) {
41
+ this.nativeBrokerPlugin = this.config.broker.nativeBrokerPlugin;
42
+ this.nativeBrokerPlugin.setLogger(this.config.system.loggerOptions);
43
+ }
44
+ else {
45
+ this.logger.warning("NativeBroker implementation was provided but the broker is unavailable.");
46
+ }
47
+ }
48
+ }
49
+ /**
50
+ * Acquires a token from the authority using OAuth2.0 device code flow.
51
+ * This flow is designed for devices that do not have access to a browser or have input constraints.
52
+ * The authorization server issues a DeviceCode object with a verification code, an end-user code,
53
+ * and the end-user verification URI. The DeviceCode object is provided through a callback, and the end-user should be
54
+ * instructed to use another device to navigate to the verification URI to input credentials.
55
+ * Since the client cannot receive incoming requests, it polls the authorization server repeatedly
56
+ * until the end-user completes input of credentials.
57
+ */
58
+ async acquireTokenByDeviceCode(request) {
59
+ this.logger.info("acquireTokenByDeviceCode called", request.correlationId);
60
+ const validRequest = Object.assign(request, await this.initializeBaseRequest(request));
61
+ const serverTelemetryManager = this.initializeServerTelemetryManager(ApiId.acquireTokenByDeviceCode, validRequest.correlationId);
62
+ try {
63
+ const deviceCodeConfig = await this.buildOauthClientConfiguration(validRequest.authority, validRequest.correlationId, serverTelemetryManager, undefined, request.azureCloudOptions);
64
+ const deviceCodeClient = new DeviceCodeClient(deviceCodeConfig);
65
+ this.logger.verbose("Device code client created", validRequest.correlationId);
66
+ return deviceCodeClient.acquireToken(validRequest);
67
+ }
68
+ catch (e) {
69
+ if (e instanceof AuthError) {
70
+ e.setCorrelationId(validRequest.correlationId);
71
+ }
72
+ serverTelemetryManager.cacheFailedRequest(e);
73
+ throw e;
74
+ }
75
+ }
76
+ /**
77
+ * Acquires a token interactively via the browser by requesting an authorization code then exchanging it for a token.
78
+ */
79
+ async acquireTokenInteractive(request) {
80
+ const correlationId = request.correlationId || this.cryptoProvider.createNewGuid();
81
+ this.logger.trace("acquireTokenInteractive called", correlationId);
82
+ const { openBrowser, successTemplate, errorTemplate, windowHandle, loopbackClient: customLoopbackClient, ...remainingProperties } = request;
83
+ if (this.nativeBrokerPlugin) {
84
+ const brokerRequest = {
85
+ ...remainingProperties,
86
+ clientId: this.config.auth.clientId,
87
+ scopes: request.scopes || OIDC_DEFAULT_SCOPES,
88
+ redirectUri: `${Constants$1.HTTP_PROTOCOL}${Constants$1.LOCALHOST}`,
89
+ authority: request.authority || this.config.auth.authority,
90
+ correlationId: correlationId,
91
+ extraParameters: {
92
+ ...remainingProperties.extraQueryParameters,
93
+ ...remainingProperties.tokenQueryParameters,
94
+ },
95
+ accountId: remainingProperties.account?.nativeAccountId,
96
+ };
97
+ return this.nativeBrokerPlugin.acquireTokenInteractive(brokerRequest, windowHandle);
98
+ }
99
+ const { verifier, challenge } = await this.cryptoProvider.generatePkceCodes();
100
+ const loopbackClient = customLoopbackClient || new LoopbackClient();
101
+ let authCodeResponse = {};
102
+ let authCodeListenerError = null;
103
+ try {
104
+ const authCodeListener = loopbackClient
105
+ .listenForAuthCode(successTemplate, errorTemplate)
106
+ .then((response) => {
107
+ authCodeResponse = response;
108
+ })
109
+ .catch((e) => {
110
+ // Store the promise instead of throwing so we can control when its thrown
111
+ authCodeListenerError = e;
112
+ });
113
+ // Wait for server to be listening
114
+ const redirectUri = await this.waitForRedirectUri(loopbackClient);
115
+ const validRequest = {
116
+ ...remainingProperties,
117
+ correlationId: correlationId,
118
+ scopes: request.scopes || OIDC_DEFAULT_SCOPES,
119
+ redirectUri: redirectUri,
120
+ responseMode: ResponseMode.QUERY,
121
+ codeChallenge: challenge,
122
+ codeChallengeMethod: CodeChallengeMethodValues.S256,
123
+ };
124
+ const authCodeUrl = await this.getAuthCodeUrl(validRequest);
125
+ await openBrowser(authCodeUrl);
126
+ await authCodeListener;
127
+ if (authCodeListenerError) {
128
+ throw authCodeListenerError;
129
+ }
130
+ if (authCodeResponse.error) {
131
+ throw new ServerError(authCodeResponse.error, authCodeResponse.error_description, authCodeResponse.suberror);
132
+ }
133
+ else if (!authCodeResponse.code) {
134
+ throw NodeAuthError.createNoAuthCodeInResponseError();
135
+ }
136
+ const clientInfo = authCodeResponse.client_info;
137
+ const tokenRequest = {
138
+ code: authCodeResponse.code,
139
+ codeVerifier: verifier,
140
+ clientInfo: clientInfo || Constants.EMPTY_STRING,
141
+ ...validRequest,
142
+ };
143
+ return this.acquireTokenByCode(tokenRequest);
144
+ }
145
+ finally {
146
+ loopbackClient.closeServer();
147
+ }
148
+ }
149
+ /**
150
+ * Returns a token retrieved either from the cache or by exchanging the refresh token for a fresh access token. If brokering is enabled the token request will be serviced by the broker.
151
+ * @param request
152
+ * @returns
153
+ */
154
+ async acquireTokenSilent(request) {
155
+ const correlationId = request.correlationId || this.cryptoProvider.createNewGuid();
156
+ this.logger.trace("acquireTokenSilent called", correlationId);
157
+ if (this.nativeBrokerPlugin) {
158
+ const brokerRequest = {
159
+ ...request,
160
+ clientId: this.config.auth.clientId,
161
+ scopes: request.scopes || OIDC_DEFAULT_SCOPES,
162
+ redirectUri: `${Constants$1.HTTP_PROTOCOL}${Constants$1.LOCALHOST}`,
163
+ authority: request.authority || this.config.auth.authority,
164
+ correlationId: correlationId,
165
+ extraParameters: request.tokenQueryParameters,
166
+ accountId: request.account.nativeAccountId,
167
+ forceRefresh: request.forceRefresh || false,
168
+ };
169
+ return this.nativeBrokerPlugin.acquireTokenSilent(brokerRequest);
170
+ }
171
+ return super.acquireTokenSilent(request);
172
+ }
173
+ /**
174
+ * Removes cache artifacts associated with the given account
175
+ * @param request
176
+ * @returns
177
+ */
178
+ async signOut(request) {
179
+ if (this.nativeBrokerPlugin && request.account.nativeAccountId) {
180
+ const signoutRequest = {
181
+ clientId: this.config.auth.clientId,
182
+ accountId: request.account.nativeAccountId,
183
+ correlationId: request.correlationId ||
184
+ this.cryptoProvider.createNewGuid(),
185
+ };
186
+ await this.nativeBrokerPlugin.signOut(signoutRequest);
187
+ }
188
+ await this.getTokenCache().removeAccount(request.account);
189
+ }
190
+ /**
191
+ * Returns all cached accounts for this application. If brokering is enabled this request will be serviced by the broker.
192
+ * @returns
193
+ */
194
+ async getAllAccounts() {
195
+ if (this.nativeBrokerPlugin) {
196
+ const correlationId = this.cryptoProvider.createNewGuid();
197
+ return this.nativeBrokerPlugin.getAllAccounts(this.config.auth.clientId, correlationId);
198
+ }
199
+ return this.getTokenCache().getAllAccounts();
200
+ }
201
+ /**
202
+ * Attempts to retrieve the redirectUri from the loopback server. If the loopback server does not start listening for requests within the timeout this will throw.
203
+ * @param loopbackClient
204
+ * @returns
205
+ */
206
+ async waitForRedirectUri(loopbackClient) {
207
+ return new Promise((resolve, reject) => {
208
+ let ticks = 0;
209
+ const id = setInterval(() => {
210
+ if (LOOPBACK_SERVER_CONSTANTS.TIMEOUT_MS /
211
+ LOOPBACK_SERVER_CONSTANTS.INTERVAL_MS <
212
+ ticks) {
213
+ clearInterval(id);
214
+ reject(NodeAuthError.createLoopbackServerTimeoutError());
215
+ return;
216
+ }
217
+ try {
218
+ const r = loopbackClient.getRedirectUri();
219
+ clearInterval(id);
220
+ resolve(r);
221
+ return;
222
+ }
223
+ catch (e) {
224
+ if (e instanceof AuthError &&
225
+ e.errorCode ===
226
+ NodeAuthErrorMessage.noLoopbackServerExists.code) {
227
+ // Loopback server is not listening yet
228
+ ticks++;
229
+ return;
230
+ }
231
+ clearInterval(id);
232
+ reject(e);
233
+ return;
234
+ }
235
+ }, LOOPBACK_SERVER_CONSTANTS.INTERVAL_MS);
236
+ });
237
+ }
184
238
  }
185
239
 
186
240
  export { PublicClientApplication };
@@ -1 +1 @@
1
- {"version":3,"file":"PublicClientApplication.mjs","sources":["../../src/client/PublicClientApplication.ts"],"sourcesContent":[null],"names":["CommonConstants"],"mappings":";;;;;;;;;AAAA;;;AAGG;AA+BH;;;;AAIG;AACG,MAAO,uBACT,SAAQ,iBAAiB,CAAA;AAIzB;;;;;;;;;;;;;;;;AAgBG;AACH,IAAA,WAAA,CAAY,aAA4B,EAAA;QACpC,KAAK,CAAC,aAAa,CAAC,CAAC;AACrB,QAAA,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,kBAAkB,EAAE;YACvC,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,kBAAkB,CAAC,iBAAiB,EAAE;gBACzD,IAAI,CAAC,kBAAkB,GAAG,IA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O,CAAC,eAAe,EAAE;AAC5D,YAAA,MAAM,cAAc,GAAyB;AACzC,gBAAA,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ;AACnC,gBAAA,SAAS,EAAE,OAAO,CAAC,OAAO,CAAC,eAAe;gBAC1C,aAAa,EACT,OAAO,CAAC,aAAa;AACrB,oBAAA,IAAI,CAAC,cAAc,CAAC,aAAa,EAAE;aAC1C,CAAC;YACF,MAAM,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;AACzD,SAAA;QAED,MAAM,IAAI,CAAC,aAAa,EAAE,CAAC,aAAa,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;KAC7D;AAED;;;AAGG;AACH,IAAA,MAAM,cAAc,GAAA;QAChB,IAAI,IAAI,CAAC,kBAAkB,EAAE;YACzB,MAAM,aAAa,GAAG,IAAI,CAAC,cAAc,CAAC,aAAa,EAAE,CAAC;AAC1D,YAAA,OAAO,IAAI,CAAC,kBAAkB,CAAC,cAAc,CACzC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,EACzB,aAAa,CAChB,CAAC;AACL,SAAA;AAED,QAAA,OAAO,IAAI,CAAC,aAAa,EAAE,CAAC,cAAc,EAAE,CAAC;KAChD;AACJ;;;;"}
1
+ {"version":3,"file":"PublicClientApplication.mjs","sources":["../../src/client/PublicClientApplication.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;AAUA;AAeA;AACA;AACA;;;AAgBG;AACH;;AAKI,MAAA,uBAAA,SAAA,iBAAA,CAAA;;;;;;;;;;;;;;;;AAgBG;AACS;AAgBZ,IAAA,WAAA,CAAA,aAAA,EAAA;;;;;;;;AAQG,gBAAA,IAAA,CAAA,MAAA,CAAA,OAAA,CAAA,yEAAA,CAAA,CAAA;aACkC;AAsCrC,SAAA;;AAEG;;AAkGH;;;;AAIG;;AA0BH;;;;AAIG,QAAA,MAAA,sBAAA,GAAA,IAAA,CAAA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