@azure/msal-common 15.2.0 → 15.3.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 (190) hide show
  1. package/dist/account/AccountInfo.mjs +1 -1
  2. package/dist/account/AuthToken.mjs +1 -1
  3. package/dist/account/CcsCredential.mjs +1 -1
  4. package/dist/account/ClientInfo.mjs +1 -1
  5. package/dist/account/TokenClaims.mjs +1 -1
  6. package/dist/authority/Authority.mjs +1 -1
  7. package/dist/authority/AuthorityFactory.mjs +1 -1
  8. package/dist/authority/AuthorityMetadata.mjs +1 -1
  9. package/dist/authority/AuthorityOptions.mjs +1 -1
  10. package/dist/authority/AuthorityType.mjs +1 -1
  11. package/dist/authority/CloudInstanceDiscoveryErrorResponse.mjs +1 -1
  12. package/dist/authority/CloudInstanceDiscoveryResponse.mjs +1 -1
  13. package/dist/authority/OpenIdConfigResponse.mjs +1 -1
  14. package/dist/authority/ProtocolMode.mjs +1 -1
  15. package/dist/authority/RegionDiscovery.mjs +1 -1
  16. package/dist/cache/CacheManager.mjs +1 -1
  17. package/dist/cache/entities/AccountEntity.mjs +1 -1
  18. package/dist/cache/persistence/TokenCacheContext.mjs +1 -1
  19. package/dist/cache/utils/CacheHelpers.mjs +1 -1
  20. package/dist/client/AuthorizationCodeClient.d.ts +0 -31
  21. package/dist/client/AuthorizationCodeClient.d.ts.map +1 -1
  22. package/dist/client/AuthorizationCodeClient.mjs +43 -258
  23. package/dist/client/AuthorizationCodeClient.mjs.map +1 -1
  24. package/dist/client/BaseClient.d.ts.map +1 -1
  25. package/dist/client/BaseClient.mjs +9 -10
  26. package/dist/client/BaseClient.mjs.map +1 -1
  27. package/dist/client/RefreshTokenClient.d.ts.map +1 -1
  28. package/dist/client/RefreshTokenClient.mjs +29 -41
  29. package/dist/client/RefreshTokenClient.mjs.map +1 -1
  30. package/dist/client/SilentFlowClient.mjs +1 -1
  31. package/dist/config/ClientConfiguration.mjs +1 -1
  32. package/dist/constants/AADServerParamKeys.d.ts +1 -0
  33. package/dist/constants/AADServerParamKeys.d.ts.map +1 -1
  34. package/dist/constants/AADServerParamKeys.mjs +4 -3
  35. package/dist/constants/AADServerParamKeys.mjs.map +1 -1
  36. package/dist/crypto/ICrypto.mjs +1 -1
  37. package/dist/crypto/JoseHeader.mjs +1 -1
  38. package/dist/crypto/PopTokenGenerator.mjs +1 -1
  39. package/dist/error/AuthError.mjs +1 -1
  40. package/dist/error/AuthErrorCodes.mjs +1 -1
  41. package/dist/error/CacheError.mjs +1 -1
  42. package/dist/error/CacheErrorCodes.mjs +1 -1
  43. package/dist/error/ClientAuthError.mjs +1 -1
  44. package/dist/error/ClientAuthErrorCodes.mjs +1 -1
  45. package/dist/error/ClientConfigurationError.mjs +1 -1
  46. package/dist/error/ClientConfigurationErrorCodes.mjs +1 -1
  47. package/dist/error/InteractionRequiredAuthError.mjs +1 -1
  48. package/dist/error/InteractionRequiredAuthErrorCodes.mjs +1 -1
  49. package/dist/error/JoseHeaderError.mjs +1 -1
  50. package/dist/error/JoseHeaderErrorCodes.mjs +1 -1
  51. package/dist/error/NetworkError.mjs +1 -1
  52. package/dist/error/ServerError.mjs +1 -1
  53. package/dist/exports-common.d.ts +4 -3
  54. package/dist/exports-common.d.ts.map +1 -1
  55. package/dist/index-browser.mjs +6 -2
  56. package/dist/index-browser.mjs.map +1 -1
  57. package/dist/index-node.mjs +6 -2
  58. package/dist/index-node.mjs.map +1 -1
  59. package/dist/index.mjs +6 -2
  60. package/dist/index.mjs.map +1 -1
  61. package/dist/logger/Logger.mjs +1 -1
  62. package/dist/network/INetworkModule.mjs +1 -1
  63. package/dist/network/RequestThumbprint.d.ts +3 -0
  64. package/dist/network/RequestThumbprint.d.ts.map +1 -1
  65. package/dist/network/RequestThumbprint.mjs +24 -0
  66. package/dist/network/RequestThumbprint.mjs.map +1 -0
  67. package/dist/network/ThrottlingUtils.d.ts.map +1 -1
  68. package/dist/network/ThrottlingUtils.mjs +3 -13
  69. package/dist/network/ThrottlingUtils.mjs.map +1 -1
  70. package/dist/packageMetadata.d.ts +1 -1
  71. package/dist/packageMetadata.mjs +2 -2
  72. package/dist/protocol/Authorize.d.ts +37 -0
  73. package/dist/protocol/Authorize.d.ts.map +1 -0
  74. package/dist/protocol/Authorize.mjs +237 -0
  75. package/dist/protocol/Authorize.mjs.map +1 -0
  76. package/dist/request/AuthenticationHeaderParser.mjs +1 -1
  77. package/dist/request/BaseAuthRequest.d.ts +2 -0
  78. package/dist/request/BaseAuthRequest.d.ts.map +1 -1
  79. package/dist/request/CommonAuthorizationCodeRequest.d.ts +0 -2
  80. package/dist/request/CommonAuthorizationCodeRequest.d.ts.map +1 -1
  81. package/dist/request/CommonDeviceCodeRequest.d.ts +1 -1
  82. package/dist/request/CommonDeviceCodeRequest.d.ts.map +1 -1
  83. package/dist/request/CommonRefreshTokenRequest.d.ts +0 -2
  84. package/dist/request/CommonRefreshTokenRequest.d.ts.map +1 -1
  85. package/dist/request/CommonSilentFlowRequest.d.ts +0 -3
  86. package/dist/request/CommonSilentFlowRequest.d.ts.map +1 -1
  87. package/dist/request/RequestParameterBuilder.d.ts +206 -218
  88. package/dist/request/RequestParameterBuilder.d.ts.map +1 -1
  89. package/dist/request/RequestParameterBuilder.mjs +356 -369
  90. package/dist/request/RequestParameterBuilder.mjs.map +1 -1
  91. package/dist/request/RequestValidator.mjs +1 -1
  92. package/dist/request/ScopeSet.mjs +1 -1
  93. package/dist/response/AuthorizeResponse.d.ts +72 -0
  94. package/dist/response/AuthorizeResponse.d.ts.map +1 -0
  95. package/dist/response/ResponseHandler.d.ts +0 -8
  96. package/dist/response/ResponseHandler.d.ts.map +1 -1
  97. package/dist/response/ResponseHandler.mjs +7 -52
  98. package/dist/response/ResponseHandler.mjs.map +1 -1
  99. package/dist/telemetry/performance/PerformanceClient.mjs +1 -1
  100. package/dist/telemetry/performance/PerformanceEvent.d.ts +1 -2
  101. package/dist/telemetry/performance/PerformanceEvent.d.ts.map +1 -1
  102. package/dist/telemetry/performance/PerformanceEvent.mjs +2 -11
  103. package/dist/telemetry/performance/PerformanceEvent.mjs.map +1 -1
  104. package/dist/telemetry/performance/StubPerformanceClient.mjs +1 -1
  105. package/dist/telemetry/server/ServerTelemetryManager.mjs +1 -1
  106. package/dist/url/UrlString.mjs +1 -1
  107. package/dist/utils/ClientAssertionUtils.mjs +1 -1
  108. package/dist/utils/Constants.mjs +1 -1
  109. package/dist/utils/FunctionWrappers.mjs +1 -1
  110. package/dist/utils/ProtocolUtils.mjs +1 -1
  111. package/dist/utils/StringUtils.mjs +1 -1
  112. package/dist/utils/TimeUtils.d.ts +10 -0
  113. package/dist/utils/TimeUtils.d.ts.map +1 -1
  114. package/dist/utils/TimeUtils.mjs +20 -2
  115. package/dist/utils/TimeUtils.mjs.map +1 -1
  116. package/dist/utils/UrlUtils.d.ts +6 -2
  117. package/dist/utils/UrlUtils.d.ts.map +1 -1
  118. package/dist/utils/UrlUtils.mjs +12 -2
  119. package/dist/utils/UrlUtils.mjs.map +1 -1
  120. package/lib/index-browser.cjs +4 -2
  121. package/lib/index-browser.cjs.map +1 -1
  122. package/lib/{index-node-0IMDqzO0.js → index-node-BjtDFnOl.js} +828 -805
  123. package/lib/index-node-BjtDFnOl.js.map +1 -0
  124. package/lib/index-node.cjs +4 -2
  125. package/lib/index-node.cjs.map +1 -1
  126. package/lib/index.cjs +4 -2
  127. package/lib/index.cjs.map +1 -1
  128. package/lib/types/client/AuthorizationCodeClient.d.ts +0 -31
  129. package/lib/types/client/AuthorizationCodeClient.d.ts.map +1 -1
  130. package/lib/types/client/BaseClient.d.ts.map +1 -1
  131. package/lib/types/client/RefreshTokenClient.d.ts.map +1 -1
  132. package/lib/types/constants/AADServerParamKeys.d.ts +1 -0
  133. package/lib/types/constants/AADServerParamKeys.d.ts.map +1 -1
  134. package/lib/types/exports-common.d.ts +4 -3
  135. package/lib/types/exports-common.d.ts.map +1 -1
  136. package/lib/types/network/RequestThumbprint.d.ts +3 -0
  137. package/lib/types/network/RequestThumbprint.d.ts.map +1 -1
  138. package/lib/types/network/ThrottlingUtils.d.ts.map +1 -1
  139. package/lib/types/packageMetadata.d.ts +1 -1
  140. package/lib/types/protocol/Authorize.d.ts +37 -0
  141. package/lib/types/protocol/Authorize.d.ts.map +1 -0
  142. package/lib/types/request/BaseAuthRequest.d.ts +2 -0
  143. package/lib/types/request/BaseAuthRequest.d.ts.map +1 -1
  144. package/lib/types/request/CommonAuthorizationCodeRequest.d.ts +0 -2
  145. package/lib/types/request/CommonAuthorizationCodeRequest.d.ts.map +1 -1
  146. package/lib/types/request/CommonDeviceCodeRequest.d.ts +1 -1
  147. package/lib/types/request/CommonDeviceCodeRequest.d.ts.map +1 -1
  148. package/lib/types/request/CommonRefreshTokenRequest.d.ts +0 -2
  149. package/lib/types/request/CommonRefreshTokenRequest.d.ts.map +1 -1
  150. package/lib/types/request/CommonSilentFlowRequest.d.ts +0 -3
  151. package/lib/types/request/CommonSilentFlowRequest.d.ts.map +1 -1
  152. package/lib/types/request/RequestParameterBuilder.d.ts +206 -218
  153. package/lib/types/request/RequestParameterBuilder.d.ts.map +1 -1
  154. package/lib/types/response/AuthorizeResponse.d.ts +72 -0
  155. package/lib/types/response/AuthorizeResponse.d.ts.map +1 -0
  156. package/lib/types/response/ResponseHandler.d.ts +0 -8
  157. package/lib/types/response/ResponseHandler.d.ts.map +1 -1
  158. package/lib/types/telemetry/performance/PerformanceEvent.d.ts +1 -2
  159. package/lib/types/telemetry/performance/PerformanceEvent.d.ts.map +1 -1
  160. package/lib/types/utils/TimeUtils.d.ts +10 -0
  161. package/lib/types/utils/TimeUtils.d.ts.map +1 -1
  162. package/lib/types/utils/UrlUtils.d.ts +6 -2
  163. package/lib/types/utils/UrlUtils.d.ts.map +1 -1
  164. package/package.json +1 -1
  165. package/src/client/AuthorizationCodeClient.ts +89 -409
  166. package/src/client/BaseClient.ts +20 -12
  167. package/src/client/RefreshTokenClient.ts +66 -44
  168. package/src/constants/AADServerParamKeys.ts +1 -0
  169. package/src/exports-common.ts +8 -3
  170. package/src/network/RequestThumbprint.ts +23 -0
  171. package/src/network/ThrottlingUtils.ts +9 -14
  172. package/src/packageMetadata.ts +1 -1
  173. package/src/protocol/Authorize.ts +409 -0
  174. package/src/request/BaseAuthRequest.ts +2 -0
  175. package/src/request/CommonAuthorizationCodeRequest.ts +0 -2
  176. package/src/request/CommonDeviceCodeRequest.ts +1 -1
  177. package/src/request/CommonRefreshTokenRequest.ts +0 -2
  178. package/src/request/CommonSilentFlowRequest.ts +0 -3
  179. package/src/request/RequestParameterBuilder.ts +508 -543
  180. package/src/response/AuthorizeResponse.ts +76 -0
  181. package/src/response/ResponseHandler.ts +8 -104
  182. package/src/telemetry/performance/PerformanceEvent.ts +1 -11
  183. package/src/utils/TimeUtils.ts +20 -0
  184. package/src/utils/UrlUtils.ts +18 -4
  185. package/dist/response/ServerAuthorizationCodeResponse.d.ts +0 -27
  186. package/dist/response/ServerAuthorizationCodeResponse.d.ts.map +0 -1
  187. package/lib/index-node-0IMDqzO0.js.map +0 -1
  188. package/lib/types/response/ServerAuthorizationCodeResponse.d.ts +0 -27
  189. package/lib/types/response/ServerAuthorizationCodeResponse.d.ts.map +0 -1
  190. package/src/response/ServerAuthorizationCodeResponse.ts +0 -34
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-common v15.2.0 2025-02-18 */
1
+ /*! @azure/msal-common v15.3.0 2025-03-20 */
2
2
  'use strict';
3
3
  export { AuthorizationCodeClient } from './client/AuthorizationCodeClient.mjs';
4
4
  export { RefreshTokenClient } from './client/RefreshTokenClient.mjs';
@@ -17,9 +17,13 @@ export { CacheManager, DefaultStorageClass } from './cache/CacheManager.mjs';
17
17
  export { AccountEntity } from './cache/entities/AccountEntity.mjs';
18
18
  export { StubbedNetworkModule } from './network/INetworkModule.mjs';
19
19
  export { ThrottlingUtils } from './network/ThrottlingUtils.mjs';
20
+ export { getRequestThumbprint } from './network/RequestThumbprint.mjs';
20
21
  export { UrlString } from './url/UrlString.mjs';
21
22
  export { DEFAULT_CRYPTO_IMPLEMENTATION } from './crypto/ICrypto.mjs';
22
- export { RequestParameterBuilder } from './request/RequestParameterBuilder.mjs';
23
+ import * as Authorize from './protocol/Authorize.mjs';
24
+ export { Authorize as AuthorizeProtocol };
25
+ import * as RequestParameterBuilder from './request/RequestParameterBuilder.mjs';
26
+ export { RequestParameterBuilder };
23
27
  export { ResponseHandler, buildAccountToCache } from './response/ResponseHandler.mjs';
24
28
  export { ScopeSet } from './request/ScopeSet.mjs';
25
29
  export { AuthenticationHeaderParser } from './request/AuthenticationHeaderParser.mjs';
@@ -1 +1 @@
1
- {"version":3,"file":"index-browser.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index-browser.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-common v15.2.0 2025-02-18 */
1
+ /*! @azure/msal-common v15.3.0 2025-03-20 */
2
2
  'use strict';
3
3
  export { AuthorizationCodeClient } from './client/AuthorizationCodeClient.mjs';
4
4
  export { RefreshTokenClient } from './client/RefreshTokenClient.mjs';
@@ -17,9 +17,13 @@ export { CacheManager, DefaultStorageClass } from './cache/CacheManager.mjs';
17
17
  export { AccountEntity } from './cache/entities/AccountEntity.mjs';
18
18
  export { StubbedNetworkModule } from './network/INetworkModule.mjs';
19
19
  export { ThrottlingUtils } from './network/ThrottlingUtils.mjs';
20
+ export { getRequestThumbprint } from './network/RequestThumbprint.mjs';
20
21
  export { UrlString } from './url/UrlString.mjs';
21
22
  export { DEFAULT_CRYPTO_IMPLEMENTATION } from './crypto/ICrypto.mjs';
22
- export { RequestParameterBuilder } from './request/RequestParameterBuilder.mjs';
23
+ import * as Authorize from './protocol/Authorize.mjs';
24
+ export { Authorize as AuthorizeProtocol };
25
+ import * as RequestParameterBuilder from './request/RequestParameterBuilder.mjs';
26
+ export { RequestParameterBuilder };
23
27
  export { ResponseHandler, buildAccountToCache } from './response/ResponseHandler.mjs';
24
28
  export { ScopeSet } from './request/ScopeSet.mjs';
25
29
  export { AuthenticationHeaderParser } from './request/AuthenticationHeaderParser.mjs';
@@ -1 +1 @@
1
- {"version":3,"file":"index-node.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index-node.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-common v15.2.0 2025-02-18 */
1
+ /*! @azure/msal-common v15.3.0 2025-03-20 */
2
2
  'use strict';
3
3
  export { AuthorizationCodeClient } from './client/AuthorizationCodeClient.mjs';
4
4
  export { RefreshTokenClient } from './client/RefreshTokenClient.mjs';
@@ -17,9 +17,13 @@ export { CacheManager, DefaultStorageClass } from './cache/CacheManager.mjs';
17
17
  export { AccountEntity } from './cache/entities/AccountEntity.mjs';
18
18
  export { StubbedNetworkModule } from './network/INetworkModule.mjs';
19
19
  export { ThrottlingUtils } from './network/ThrottlingUtils.mjs';
20
+ export { getRequestThumbprint } from './network/RequestThumbprint.mjs';
20
21
  export { UrlString } from './url/UrlString.mjs';
21
22
  export { DEFAULT_CRYPTO_IMPLEMENTATION } from './crypto/ICrypto.mjs';
22
- export { RequestParameterBuilder } from './request/RequestParameterBuilder.mjs';
23
+ import * as Authorize from './protocol/Authorize.mjs';
24
+ export { Authorize as AuthorizeProtocol };
25
+ import * as RequestParameterBuilder from './request/RequestParameterBuilder.mjs';
26
+ export { RequestParameterBuilder };
23
27
  export { ResponseHandler, buildAccountToCache } from './response/ResponseHandler.mjs';
24
28
  export { ScopeSet } from './request/ScopeSet.mjs';
25
29
  export { AuthenticationHeaderParser } from './request/AuthenticationHeaderParser.mjs';
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-common v15.2.0 2025-02-18 */
1
+ /*! @azure/msal-common v15.3.0 2025-03-20 */
2
2
  'use strict';
3
3
  import { Constants } from '../utils/Constants.mjs';
4
4
 
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-common v15.2.0 2025-02-18 */
1
+ /*! @azure/msal-common v15.3.0 2025-03-20 */
2
2
  'use strict';
3
3
  import { createClientAuthError } from '../error/ClientAuthError.mjs';
4
4
  import { methodNotImplemented } from '../error/ClientAuthErrorCodes.mjs';
@@ -1,4 +1,5 @@
1
1
  import { ShrOptions } from "../crypto/SignedHttpRequest.js";
2
+ import { BaseAuthRequest } from "../request/BaseAuthRequest.js";
2
3
  import { AuthenticationScheme } from "../utils/Constants.js";
3
4
  /**
4
5
  * Type representing a unique request thumbprint.
@@ -15,5 +16,7 @@ export type RequestThumbprint = {
15
16
  shrClaims?: string;
16
17
  sshKid?: string;
17
18
  shrOptions?: ShrOptions;
19
+ embeddedClientId?: string;
18
20
  };
21
+ export declare function getRequestThumbprint(clientId: string, request: BaseAuthRequest, homeAccountId?: string): RequestThumbprint;
19
22
  //# sourceMappingURL=RequestThumbprint.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RequestThumbprint.d.ts","sourceRoot":"","sources":["../../src/network/RequestThumbprint.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAE7D;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACtB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;IAC5C,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,UAAU,CAAC;CAC3B,CAAC"}
1
+ {"version":3,"file":"RequestThumbprint.d.ts","sourceRoot":"","sources":["../../src/network/RequestThumbprint.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAE7D;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACtB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;IAC5C,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC7B,CAAC;AAEF,wBAAgB,oBAAoB,CAChC,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,eAAe,EACxB,aAAa,CAAC,EAAE,MAAM,GACvB,iBAAiB,CAenB"}
@@ -0,0 +1,24 @@
1
+ /*! @azure/msal-common v15.3.0 2025-03-20 */
2
+ 'use strict';
3
+ /*
4
+ * Copyright (c) Microsoft Corporation. All rights reserved.
5
+ * Licensed under the MIT License.
6
+ */
7
+ function getRequestThumbprint(clientId, request, homeAccountId) {
8
+ return {
9
+ clientId: clientId,
10
+ authority: request.authority,
11
+ scopes: request.scopes,
12
+ homeAccountIdentifier: homeAccountId,
13
+ claims: request.claims,
14
+ authenticationScheme: request.authenticationScheme,
15
+ resourceRequestMethod: request.resourceRequestMethod,
16
+ resourceRequestUri: request.resourceRequestUri,
17
+ shrClaims: request.shrClaims,
18
+ sshKid: request.sshKid,
19
+ embeddedClientId: request.embeddedClientId || request.tokenBodyParameters?.clientId,
20
+ };
21
+ }
22
+
23
+ export { getRequestThumbprint };
24
+ //# sourceMappingURL=RequestThumbprint.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RequestThumbprint.mjs","sources":["../../src/network/RequestThumbprint.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;;;AAGG;SAwBa,oBAAoB,CAChC,QAAgB,EAChB,OAAwB,EACxB,aAAsB,EAAA;IAEtB,OAAO;AACH,QAAA,QAAQ,EAAE,QAAQ;QAClB,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,MAAM,EAAE,OAAO,CAAC,MAAM;AACtB,QAAA,qBAAqB,EAAE,aAAa;QACpC,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,oBAAoB,EAAE,OAAO,CAAC,oBAAoB;QA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B,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,eAAe,EACxB,qBAAqB,CAAC,EAAE,MAAM,GAC/B,IAAI;CASV"}
@@ -1,7 +1,8 @@
1
- /*! @azure/msal-common v15.2.0 2025-02-18 */
1
+ /*! @azure/msal-common v15.3.0 2025-03-20 */
2
2
  'use strict';
3
3
  import { ThrottlingConstants, Constants, HeaderNames } from '../utils/Constants.mjs';
4
4
  import { ServerError } from '../error/ServerError.mjs';
5
+ import { getRequestThumbprint } from './RequestThumbprint.mjs';
5
6
 
6
7
  /*
7
8
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -82,18 +83,7 @@ class ThrottlingUtils {
82
83
  ThrottlingConstants.DEFAULT_MAX_THROTTLE_TIME_SECONDS) * 1000);
83
84
  }
84
85
  static removeThrottle(cacheManager, clientId, request, homeAccountIdentifier) {
85
- const thumbprint = {
86
- clientId: clientId,
87
- authority: request.authority,
88
- scopes: request.scopes,
89
- homeAccountIdentifier: homeAccountIdentifier,
90
- claims: request.claims,
91
- authenticationScheme: request.authenticationScheme,
92
- resourceRequestMethod: request.resourceRequestMethod,
93
- resourceRequestUri: request.resourceRequestUri,
94
- shrClaims: request.shrClaims,
95
- sshKid: request.sshKid,
96
- };
86
+ const thumbprint = getRequestThumbprint(clientId, request, homeAccountIdentifier);
97
87
  const key = this.generateThrottlingStorageKey(thumbprint);
98
88
  cacheManager.removeItem(key);
99
89
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ThrottlingUtils.mjs","sources":["../../src/network/ThrottlingUtils.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;AAAA;;;AAGG;AAeH;MACa,eAAe,CAAA;AACxB;;;AAGG;IACH,OAAO,4BAA4B,CAAC,UAA6B,EAAA;AAC7D,QAAA,OAAO,CAAG,EAAA,mBAAmB,CAAC,iBAAiB,CAAI,CAAA,EAAA,IAAI,CAAC,SAAS,CAC7D,UAAU,CACb,CAAA,CAAE,CAAC;KACP;AAED;;;;AAIG;AACH,IA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AAO,qBAAqB,CAAC,YAAoB,EAAA;AAC7C,QAAA,MAAM,IAAI,GAAG,YAAY,IAAI,CAAC,GAAG,CAAC,GAAG,YAAY,CAAC;QAElD,MAAM,cAAc,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC;QACzC,OAAO,IAAI,CAAC,KAAK,CACb,IAAI,CAAC,GAAG,CACJ,cAAc;AACV,aAAC,IAAI,IAAI,mBAAmB,CAAC,6BAA6B,CAAC,EAC/D,cAAc;AACV,YAAA,mBAAmB,CAAC,iCAAiC,CAC5D,GAAG,IAAI,CACX,CAAC;KACL;IAED,OAAO,cAAc,CACjB,YAA0B,EAC1B,QAAgB,EAChB,OAAwB,EACxB,qBAA8B,EAAA;QAE9B,MAAM,UAAU,GAAG,oBAAoB,CACnC,QAAQ,EACR,OAAO,EACP,qBAAqB,CACxB,CAAC;QACF,MAAM,GAAG,GAAG,IAAI,CAAC,4BAA4B,CAAC,UAAU,CAAC,CAAC;AAC1D,QAAA,YAAY,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;KAChC;AACJ;;;;"}
@@ -1,3 +1,3 @@
1
1
  export declare const name = "@azure/msal-common";
2
- export declare const version = "15.2.0";
2
+ export declare const version = "15.3.0";
3
3
  //# sourceMappingURL=packageMetadata.d.ts.map
@@ -1,8 +1,8 @@
1
- /*! @azure/msal-common v15.2.0 2025-02-18 */
1
+ /*! @azure/msal-common v15.3.0 2025-03-20 */
2
2
  'use strict';
3
3
  /* eslint-disable header/header */
4
4
  const name = "@azure/msal-common";
5
- const version = "15.2.0";
5
+ const version = "15.3.0";
6
6
 
7
7
  export { name, version };
8
8
  //# sourceMappingURL=packageMetadata.mjs.map
@@ -0,0 +1,37 @@
1
+ import { CommonAuthorizationUrlRequest } from "../request/CommonAuthorizationUrlRequest.js";
2
+ import { IPerformanceClient } from "../telemetry/performance/IPerformanceClient.js";
3
+ import { AuthOptions } from "../config/ClientConfiguration.js";
4
+ import { Logger } from "../logger/Logger.js";
5
+ import { Authority } from "../authority/Authority.js";
6
+ import { AuthorizationCodePayload } from "../response/AuthorizationCodePayload.js";
7
+ import { AuthorizeResponse } from "../response/AuthorizeResponse.js";
8
+ /**
9
+ * Returns map of parameters that are applicable to all calls to /authorize whether using PKCE or EAR
10
+ * @param config
11
+ * @param request
12
+ * @param logger
13
+ * @param performanceClient
14
+ * @returns
15
+ */
16
+ export declare function getStandardAuthorizeRequestParameters(authOptions: AuthOptions, request: CommonAuthorizationUrlRequest, logger: Logger, performanceClient?: IPerformanceClient): Map<string, string>;
17
+ /**
18
+ * Returns authorize endpoint with given request parameters in the query string
19
+ * @param authority
20
+ * @param requestParameters
21
+ * @returns
22
+ */
23
+ export declare function getAuthorizeUrl(authority: Authority, requestParameters: Map<string, string>): string;
24
+ /**
25
+ * Handles the hash fragment response from public client code request. Returns a code response used by
26
+ * the client to exchange for a token in acquireToken.
27
+ * @param serverParams
28
+ * @param cachedState
29
+ */
30
+ export declare function getAuthorizationCodePayload(serverParams: AuthorizeResponse, cachedState: string): AuthorizationCodePayload;
31
+ /**
32
+ * Function which validates server authorization code response.
33
+ * @param serverResponseHash
34
+ * @param requestState
35
+ */
36
+ export declare function validateAuthorizationResponse(serverResponse: AuthorizeResponse, requestState: string): void;
37
+ //# sourceMappingURL=Authorize.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Authorize.d.ts","sourceRoot":"","sources":["../../src/protocol/Authorize.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,6BAA6B,EAAE,MAAM,6CAA6C,CAAC;AAE5F,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AAEpF,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAG/D,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAGtD,OAAO,EAAE,wBAAwB,EAAE,MAAM,yCAAyC,CAAC;AACnF,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAWrE;;;;;;;GAOG;AACH,wBAAgB,qCAAqC,CACjD,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,6BAA6B,EACtC,MAAM,EAAE,MAAM,EACd,iBAAiB,CAAC,EAAE,kBAAkB,GACvC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAsNrB;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAC3B,SAAS,EAAE,SAAS,EACpB,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GACvC,MAAM,CAOR;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CACvC,YAAY,EAAE,iBAAiB,EAC/B,WAAW,EAAE,MAAM,GACpB,wBAAwB,CAY1B;AAED;;;;GAIG;AACH,wBAAgB,6BAA6B,CACzC,cAAc,EAAE,iBAAiB,EACjC,YAAY,EAAE,MAAM,GACrB,IAAI,CAuEN"}
@@ -0,0 +1,237 @@
1
+ /*! @azure/msal-common v15.3.0 2025-03-20 */
2
+ 'use strict';
3
+ import { addClientId, addScopes, addRedirectUri, addCorrelationId, addResponseMode, addClientInfo, addPrompt, addDomainHint, addSid, addLoginHint, addCcsOid, addCcsUpn, addNonce, addState, addClaims, addBrokerParameters, addExtraQueryParameters, addInstanceAware } from '../request/RequestParameterBuilder.mjs';
4
+ import { CLIENT_ID } from '../constants/AADServerParamKeys.mjs';
5
+ import { PromptValue } from '../utils/Constants.mjs';
6
+ import { buildClientInfoFromHomeAccountId } from '../account/ClientInfo.mjs';
7
+ import { mapToQueryString } from '../utils/UrlUtils.mjs';
8
+ import { UrlString } from '../url/UrlString.mjs';
9
+ import { createClientAuthError } from '../error/ClientAuthError.mjs';
10
+ import { isInteractionRequiredError, InteractionRequiredAuthError } from '../error/InteractionRequiredAuthError.mjs';
11
+ import { ServerError } from '../error/ServerError.mjs';
12
+ import { authorizationCodeMissingFromServerResponse, stateNotFound, invalidState, stateMismatch } from '../error/ClientAuthErrorCodes.mjs';
13
+
14
+ /*
15
+ * Copyright (c) Microsoft Corporation. All rights reserved.
16
+ * Licensed under the MIT License.
17
+ */
18
+ /**
19
+ * Returns map of parameters that are applicable to all calls to /authorize whether using PKCE or EAR
20
+ * @param config
21
+ * @param request
22
+ * @param logger
23
+ * @param performanceClient
24
+ * @returns
25
+ */
26
+ function getStandardAuthorizeRequestParameters(authOptions, request, logger, performanceClient) {
27
+ // generate the correlationId if not set by the user and add
28
+ const correlationId = request.correlationId;
29
+ const parameters = new Map();
30
+ addClientId(parameters, request.embeddedClientId ||
31
+ request.extraQueryParameters?.[CLIENT_ID] ||
32
+ authOptions.clientId);
33
+ const requestScopes = [
34
+ ...(request.scopes || []),
35
+ ...(request.extraScopesToConsent || []),
36
+ ];
37
+ addScopes(parameters, requestScopes, true, authOptions.authority.options.OIDCOptions?.defaultScopes);
38
+ addRedirectUri(parameters, request.redirectUri);
39
+ addCorrelationId(parameters, correlationId);
40
+ // add response_mode. If not passed in it defaults to query.
41
+ addResponseMode(parameters, request.responseMode);
42
+ // add client_info=1
43
+ addClientInfo(parameters);
44
+ if (request.prompt) {
45
+ addPrompt(parameters, request.prompt);
46
+ performanceClient?.addFields({ prompt: request.prompt }, correlationId);
47
+ }
48
+ if (request.domainHint) {
49
+ addDomainHint(parameters, request.domainHint);
50
+ performanceClient?.addFields({ domainHintFromRequest: true }, correlationId);
51
+ }
52
+ // Add sid or loginHint with preference for login_hint claim (in request) -> sid -> loginHint (upn/email) -> username of AccountInfo object
53
+ if (request.prompt !== PromptValue.SELECT_ACCOUNT) {
54
+ // AAD will throw if prompt=select_account is passed with an account hint
55
+ if (request.sid && request.prompt === PromptValue.NONE) {
56
+ // SessionID is only used in silent calls
57
+ logger.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from request");
58
+ addSid(parameters, request.sid);
59
+ performanceClient?.addFields({ sidFromRequest: true }, correlationId);
60
+ }
61
+ else if (request.account) {
62
+ const accountSid = extractAccountSid(request.account);
63
+ let accountLoginHintClaim = extractLoginHint(request.account);
64
+ if (accountLoginHintClaim && request.domainHint) {
65
+ logger.warning(`AuthorizationCodeClient.createAuthCodeUrlQueryString: "domainHint" param is set, skipping opaque "login_hint" claim. Please consider not passing domainHint`);
66
+ accountLoginHintClaim = null;
67
+ }
68
+ // If login_hint claim is present, use it over sid/username
69
+ if (accountLoginHintClaim) {
70
+ logger.verbose("createAuthCodeUrlQueryString: login_hint claim present on account");
71
+ addLoginHint(parameters, accountLoginHintClaim);
72
+ performanceClient?.addFields({ loginHintFromClaim: true }, correlationId);
73
+ try {
74
+ const clientInfo = buildClientInfoFromHomeAccountId(request.account.homeAccountId);
75
+ addCcsOid(parameters, clientInfo);
76
+ }
77
+ catch (e) {
78
+ logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header");
79
+ }
80
+ }
81
+ else if (accountSid && request.prompt === PromptValue.NONE) {
82
+ /*
83
+ * If account and loginHint are provided, we will check account first for sid before adding loginHint
84
+ * SessionId is only used in silent calls
85
+ */
86
+ logger.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from account");
87
+ addSid(parameters, accountSid);
88
+ performanceClient?.addFields({ sidFromClaim: true }, correlationId);
89
+ try {
90
+ const clientInfo = buildClientInfoFromHomeAccountId(request.account.homeAccountId);
91
+ addCcsOid(parameters, clientInfo);
92
+ }
93
+ catch (e) {
94
+ logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header");
95
+ }
96
+ }
97
+ else if (request.loginHint) {
98
+ logger.verbose("createAuthCodeUrlQueryString: Adding login_hint from request");
99
+ addLoginHint(parameters, request.loginHint);
100
+ addCcsUpn(parameters, request.loginHint);
101
+ performanceClient?.addFields({ loginHintFromRequest: true }, correlationId);
102
+ }
103
+ else if (request.account.username) {
104
+ // Fallback to account username if provided
105
+ logger.verbose("createAuthCodeUrlQueryString: Adding login_hint from account");
106
+ addLoginHint(parameters, request.account.username);
107
+ performanceClient?.addFields({ loginHintFromUpn: true }, correlationId);
108
+ try {
109
+ const clientInfo = buildClientInfoFromHomeAccountId(request.account.homeAccountId);
110
+ addCcsOid(parameters, clientInfo);
111
+ }
112
+ catch (e) {
113
+ logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header");
114
+ }
115
+ }
116
+ }
117
+ else if (request.loginHint) {
118
+ logger.verbose("createAuthCodeUrlQueryString: No account, adding login_hint from request");
119
+ addLoginHint(parameters, request.loginHint);
120
+ addCcsUpn(parameters, request.loginHint);
121
+ performanceClient?.addFields({ loginHintFromRequest: true }, correlationId);
122
+ }
123
+ }
124
+ else {
125
+ logger.verbose("createAuthCodeUrlQueryString: Prompt is select_account, ignoring account hints");
126
+ }
127
+ if (request.nonce) {
128
+ addNonce(parameters, request.nonce);
129
+ }
130
+ if (request.state) {
131
+ addState(parameters, request.state);
132
+ }
133
+ if (request.claims ||
134
+ (authOptions.clientCapabilities &&
135
+ authOptions.clientCapabilities.length > 0)) {
136
+ addClaims(parameters, request.claims, authOptions.clientCapabilities);
137
+ }
138
+ if (request.embeddedClientId) {
139
+ addBrokerParameters(parameters, authOptions.clientId, authOptions.redirectUri);
140
+ }
141
+ if (request.extraQueryParameters) {
142
+ addExtraQueryParameters(parameters, request.extraQueryParameters);
143
+ }
144
+ if (authOptions.instanceAware) {
145
+ addInstanceAware(parameters);
146
+ }
147
+ return parameters;
148
+ }
149
+ /**
150
+ * Returns authorize endpoint with given request parameters in the query string
151
+ * @param authority
152
+ * @param requestParameters
153
+ * @returns
154
+ */
155
+ function getAuthorizeUrl(authority, requestParameters) {
156
+ const queryString = mapToQueryString(requestParameters);
157
+ return UrlString.appendQueryString(authority.authorizationEndpoint, queryString);
158
+ }
159
+ /**
160
+ * Handles the hash fragment response from public client code request. Returns a code response used by
161
+ * the client to exchange for a token in acquireToken.
162
+ * @param serverParams
163
+ * @param cachedState
164
+ */
165
+ function getAuthorizationCodePayload(serverParams, cachedState) {
166
+ // Get code response
167
+ validateAuthorizationResponse(serverParams, cachedState);
168
+ // throw when there is no auth code in the response
169
+ if (!serverParams.code) {
170
+ throw createClientAuthError(authorizationCodeMissingFromServerResponse);
171
+ }
172
+ return serverParams;
173
+ }
174
+ /**
175
+ * Function which validates server authorization code response.
176
+ * @param serverResponseHash
177
+ * @param requestState
178
+ */
179
+ function validateAuthorizationResponse(serverResponse, requestState) {
180
+ if (!serverResponse.state || !requestState) {
181
+ throw serverResponse.state
182
+ ? createClientAuthError(stateNotFound, "Cached State")
183
+ : createClientAuthError(stateNotFound, "Server State");
184
+ }
185
+ let decodedServerResponseState;
186
+ let decodedRequestState;
187
+ try {
188
+ decodedServerResponseState = decodeURIComponent(serverResponse.state);
189
+ }
190
+ catch (e) {
191
+ throw createClientAuthError(invalidState, serverResponse.state);
192
+ }
193
+ try {
194
+ decodedRequestState = decodeURIComponent(requestState);
195
+ }
196
+ catch (e) {
197
+ throw createClientAuthError(invalidState, serverResponse.state);
198
+ }
199
+ if (decodedServerResponseState !== decodedRequestState) {
200
+ throw createClientAuthError(stateMismatch);
201
+ }
202
+ // Check for error
203
+ if (serverResponse.error ||
204
+ serverResponse.error_description ||
205
+ serverResponse.suberror) {
206
+ const serverErrorNo = parseServerErrorNo(serverResponse);
207
+ if (isInteractionRequiredError(serverResponse.error, serverResponse.error_description, serverResponse.suberror)) {
208
+ throw new InteractionRequiredAuthError(serverResponse.error || "", serverResponse.error_description, serverResponse.suberror, serverResponse.timestamp || "", serverResponse.trace_id || "", serverResponse.correlation_id || "", serverResponse.claims || "", serverErrorNo);
209
+ }
210
+ throw new ServerError(serverResponse.error || "", serverResponse.error_description, serverResponse.suberror, serverErrorNo);
211
+ }
212
+ }
213
+ /**
214
+ * Get server error No from the error_uri
215
+ * @param serverResponse
216
+ * @returns
217
+ */
218
+ function parseServerErrorNo(serverResponse) {
219
+ const errorCodePrefix = "code=";
220
+ const errorCodePrefixIndex = serverResponse.error_uri?.lastIndexOf(errorCodePrefix);
221
+ return errorCodePrefixIndex && errorCodePrefixIndex >= 0
222
+ ? serverResponse.error_uri?.substring(errorCodePrefixIndex + errorCodePrefix.length)
223
+ : undefined;
224
+ }
225
+ /**
226
+ * Helper to get sid from account. Returns null if idTokenClaims are not present or sid is not present.
227
+ * @param account
228
+ */
229
+ function extractAccountSid(account) {
230
+ return account.idTokenClaims?.sid || null;
231
+ }
232
+ function extractLoginHint(account) {
233
+ return account.idTokenClaims?.login_hint || null;
234
+ }
235
+
236
+ export { getAuthorizationCodePayload, getAuthorizeUrl, getStandardAuthorizeRequestParameters, validateAuthorizationResponse };
237
+ //# sourceMappingURL=Authorize.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Authorize.mjs","sources":["../../src/protocol/Authorize.ts"],"sourcesContent":[null],"names":["RequestParameterBuilder.addClientId","AADServerParamKeys.CLIENT_ID","RequestParameterBuilder.addScopes","RequestParameterBuilder.addRedirectUri","RequestParameterBuilder.addCorrelationId","RequestParameterBuilder.addResponseMode","RequestParameterBuilder.addClientInfo","RequestParameterBuilder.addPrompt","RequestParameterBuilder.addDomainHint","RequestParameterBuilder.addSid","RequestParameterBuilder.addLoginHint","RequestParameterBuilder.addCcsOid","RequestParameterBuilder.addCcsUpn","RequestParameterBuilder.addNonce","RequestParameterBuilder.addState","RequestParameterBuilder.addClaims","RequestParameterBuilder.addBrokerParameters","RequestParameterBuilder.addExtraQueryParameters","RequestParameterBuilder.addInstanceAware","ClientAuthErrorCodes.authorizationCodeMissingFromServerResponse","ClientAuthErrorCodes.stateNotFound","ClientAuthErrorCodes.invalidState","ClientAuthErrorCodes.stateMismatch"],"mappings":";;;;;;;;;;;;;AAAA;;;AAGG;AA0BH;;;;;;;AAOG;AACG,SAAU,qCAAqC,CACjD,WAAwB,EACxB,OAAsC,EACtC,MAAc,EACd,iBAAsC,EAAA;;AAGtC,IAAA,MAAM,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC;AAE5C,IAAA,MAAM,UAAU,GAAG,IAAI,GAAG,EAAkB,CAAC;AAE7C,IAAAA,WAAmC,CAC/B,U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ACD,SAAS,CAAC;AACpB,CAAC;AAED;;;AAGG;AACH,SAAS,iBAAiB,CAAC,OAAoB,EAAA;AAC3C,IAAA,OAAO,OAAO,CAAC,aAAa,EAAE,GAAG,IAAI,IAAI,CAAC;AAC9C,CAAC;AAED,SAAS,gBAAgB,CAAC,OAAoB,EAAA;AAC1C,IAAA,OAAO,OAAO,CAAC,aAAa,EAAE,UAAU,IAAI,IAAI,CAAC;AACrD;;;;"}
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-common v15.2.0 2025-02-18 */
1
+ /*! @azure/msal-common v15.3.0 2025-03-20 */
2
2
  'use strict';
3
3
  import { createClientConfigurationError } from '../error/ClientConfigurationError.mjs';
4
4
  import { Constants, HeaderNames } from '../utils/Constants.mjs';
@@ -20,6 +20,7 @@ import { ShrOptions } from "../crypto/SignedHttpRequest.js";
20
20
  * - azureCloudOptions - Convenience string enums for users to provide public/sovereign cloud ids
21
21
  * - requestedClaimsHash - SHA 256 hash string of the requested claims string, used as part of an access token cache key so tokens can be filtered by requested claims
22
22
  * - tokenQueryParameters - String to string map of custom query parameters added to the /token call
23
+ * - tokenBodyParameters - String to string map of custom parameters added to the body of the /token call
23
24
  * - storeInCache - Object containing boolean values indicating whether to store tokens in the cache or not (default is true)
24
25
  * - scenarioId - Scenario id to track custom user prompts
25
26
  * - popKid - Key ID to identify the public key for PoP token request
@@ -41,6 +42,7 @@ export type BaseAuthRequest = {
41
42
  azureCloudOptions?: AzureCloudOptions;
42
43
  requestedClaimsHash?: string;
43
44
  maxAge?: number;
45
+ tokenBodyParameters?: StringDict;
44
46
  tokenQueryParameters?: StringDict;
45
47
  storeInCache?: StoreInCache;
46
48
  scenarioId?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"BaseAuthRequest.d.ts","sourceRoot":"","sources":["../../src/request/BaseAuthRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAA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E,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAE5D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,MAAM,eAAe,GAAG;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACtB,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;IAC5C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,mBAAmB,CAAC,EAAE,UAAU,CAAC;IACjC,oBAAoB,CAAC,EAAE,UAAU,CAAC;IAClC,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC7B,CAAC"}
@@ -1,5 +1,4 @@
1
1
  import { BaseAuthRequest } from "./BaseAuthRequest.js";
2
- import { StringDict } from "../utils/MsalTypes.js";
3
2
  import { CcsCredential } from "../account/CcsCredential.js";
4
3
  /**
5
4
  * Request object passed by user to acquire a token from the server exchanging a valid authorization code (second leg of OAuth2.0 Authorization Code flow)
@@ -20,7 +19,6 @@ export type CommonAuthorizationCodeRequest = BaseAuthRequest & {
20
19
  code: string;
21
20
  redirectUri: string;
22
21
  codeVerifier?: string;
23
- tokenBodyParameters?: StringDict;
24
22
  enableSpaAuthorizationCode?: boolean;
25
23
  clientInfo?: string;
26
24
  ccsCredential?: CcsCredential;
@@ -1 +1 @@
1
- {"version":3,"file":"CommonAuthorizationCodeRequest.d.ts","sourceRoot":"","sources":["../../src/request/CommonAuthorizationCodeRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,8BAA8B,GAAG,eAAe,GAAG;IAC3D,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mBAAmB,CAAC,EAAE,UAAU,CAAC;IACjC,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,aAAa,CAAC;CACjC,CAAC"}
1
+ {"version":3,"file":"CommonAuthorizationCodeRequest.d.ts","sourceRoot":"","sources":["../../src/request/CommonAuthorizationCodeRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,8BAA8B,GAAG,eAAe,GAAG;IAC3D,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,aAAa,CAAC;CACjC,CAAC"}
@@ -13,7 +13,7 @@ import { BaseAuthRequest } from "./BaseAuthRequest.js";
13
13
  * - timeout - Timeout period in seconds which the user explicitly configures for the polling of the device code endpoint. At the end of this period; assuming the device code has not expired yet; the device code polling is stopped and the request cancelled. The device code expiration window will always take precedence over this set period.
14
14
  * - extraQueryParameters - String to string map of custom query parameters added to the query string
15
15
  */
16
- export type CommonDeviceCodeRequest = Omit<BaseAuthRequest, "tokenQueryParameters"> & {
16
+ export type CommonDeviceCodeRequest = Omit<BaseAuthRequest, "tokenQueryParameters" | "tokenBodyParameters"> & {
17
17
  deviceCodeCallback: (response: DeviceCodeResponse) => void;
18
18
  cancel?: boolean;
19
19
  timeout?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"CommonDeviceCodeRequest.d.ts","sourceRoot":"","sources":["../../src/request/CommonDeviceCodeRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD;;;;;;;;;;;GAWG;AAEH,MAAM,MAAM,uBAAuB,GAAG,IAAI,CACtC,eAAe,EACf,sBAAsB,CACzB,GAAG;IACA,kBAAkB,EAAE,CAAC,QAAQ,EAAE,kBAAkB,KAAK,IAAI,CAAC;IAC3D,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,oBAAoB,CAAC,EAAE,UAAU,CAAC;CACrC,CAAC"}
1
+ {"version":3,"file":"CommonDeviceCodeRequest.d.ts","sourceRoot":"","sources":["../../src/request/CommonDeviceCodeRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD;;;;;;;;;;;GAWG;AAEH,MAAM,MAAM,uBAAuB,GAAG,IAAI,CACtC,eAAe,EACf,sBAAsB,GAAG,qBAAqB,CACjD,GAAG;IACA,kBAAkB,EAAE,CAAC,QAAQ,EAAE,kBAAkB,KAAK,IAAI,CAAC;IAC3D,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,oBAAoB,CAAC,EAAE,UAAU,CAAC;CACrC,CAAC"}
@@ -1,6 +1,5 @@
1
1
  import { BaseAuthRequest } from "./BaseAuthRequest.js";
2
2
  import { CcsCredential } from "../account/CcsCredential.js";
3
- import { StringDict } from "../utils/MsalTypes.js";
4
3
  /**
5
4
  * CommonRefreshTokenRequest
6
5
  * - scopes - Array of scopes the application is requesting access to.
@@ -17,7 +16,6 @@ export type CommonRefreshTokenRequest = BaseAuthRequest & {
17
16
  refreshToken: string;
18
17
  ccsCredential?: CcsCredential;
19
18
  forceCache?: boolean;
20
- tokenBodyParameters?: StringDict;
21
19
  redirectUri?: string;
22
20
  };
23
21
  //# sourceMappingURL=CommonRefreshTokenRequest.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CommonRefreshTokenRequest.d.ts","sourceRoot":"","sources":["../../src/request/CommonRefreshTokenRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,yBAAyB,GAAG,eAAe,GAAG;IACtD,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,mBAAmB,CAAC,EAAE,UAAU,CAAC;IACjC,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC"}
1
+ {"version":3,"file":"CommonRefreshTokenRequest.d.ts","sourceRoot":"","sources":["../../src/request/CommonRefreshTokenRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,yBAAyB,GAAG,eAAe,GAAG;IACtD,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC"}
@@ -1,5 +1,4 @@
1
1
  import { AccountInfo } from "../account/AccountInfo.js";
2
- import { StringDict } from "../utils/MsalTypes.js";
3
2
  import { BaseAuthRequest } from "./BaseAuthRequest.js";
4
3
  /**
5
4
  * SilentFlow parameters passed by the user to retrieve credentials silently
@@ -20,8 +19,6 @@ export type CommonSilentFlowRequest = BaseAuthRequest & {
20
19
  forceRefresh: boolean;
21
20
  /** RedirectUri registered on the app registration - only required in brokering scenarios */
22
21
  redirectUri?: string;
23
- /** Key value pairs to include on the POST body to the /token endpoint */
24
- tokenBodyParameters?: StringDict;
25
22
  /** If refresh token will expire within the configured value, consider it already expired. Used to pre-emptively invoke interaction when cached refresh token is close to expiry. */
26
23
  refreshTokenExpirationOffsetSeconds?: number;
27
24
  };