@azure/msal-common 14.14.1 → 14.15.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 (562) hide show
  1. package/browser/README.md +1 -0
  2. package/browser/package.json +5 -0
  3. package/dist/account/AccountInfo.d.ts +1 -1
  4. package/dist/account/AccountInfo.d.ts.map +1 -1
  5. package/dist/account/AccountInfo.mjs +1 -1
  6. package/dist/account/AuthToken.d.ts +1 -1
  7. package/dist/account/AuthToken.d.ts.map +1 -1
  8. package/dist/account/AuthToken.mjs +1 -1
  9. package/dist/account/CcsCredential.mjs +1 -1
  10. package/dist/account/ClientInfo.mjs +1 -1
  11. package/dist/account/TokenClaims.mjs +1 -1
  12. package/dist/authority/Authority.d.ts +12 -12
  13. package/dist/authority/Authority.d.ts.map +1 -1
  14. package/dist/authority/Authority.mjs +1 -1
  15. package/dist/authority/AuthorityFactory.d.ts +6 -6
  16. package/dist/authority/AuthorityFactory.d.ts.map +1 -1
  17. package/dist/authority/AuthorityFactory.mjs +1 -1
  18. package/dist/authority/AuthorityMetadata.d.ts +6 -6
  19. package/dist/authority/AuthorityMetadata.d.ts.map +1 -1
  20. package/dist/authority/AuthorityMetadata.mjs +1 -1
  21. package/dist/authority/AuthorityOptions.d.ts +4 -4
  22. package/dist/authority/AuthorityOptions.d.ts.map +1 -1
  23. package/dist/authority/AuthorityOptions.mjs +1 -1
  24. package/dist/authority/AuthorityType.mjs +1 -1
  25. package/dist/authority/AzureRegionConfiguration.d.ts +1 -1
  26. package/dist/authority/AzureRegionConfiguration.d.ts.map +1 -1
  27. package/dist/authority/CloudInstanceDiscoveryErrorResponse.mjs +1 -1
  28. package/dist/authority/CloudInstanceDiscoveryResponse.d.ts +1 -1
  29. package/dist/authority/CloudInstanceDiscoveryResponse.d.ts.map +1 -1
  30. package/dist/authority/CloudInstanceDiscoveryResponse.mjs +1 -1
  31. package/dist/authority/OIDCOptions.d.ts +1 -1
  32. package/dist/authority/OIDCOptions.d.ts.map +1 -1
  33. package/dist/authority/OpenIdConfigResponse.mjs +1 -1
  34. package/dist/authority/ProtocolMode.mjs +1 -1
  35. package/dist/authority/RegionDiscovery.d.ts +5 -5
  36. package/dist/authority/RegionDiscovery.d.ts.map +1 -1
  37. package/dist/authority/RegionDiscovery.mjs +1 -1
  38. package/dist/authority/RegionDiscoveryMetadata.d.ts +1 -1
  39. package/dist/authority/RegionDiscoveryMetadata.d.ts.map +1 -1
  40. package/dist/broker/nativeBroker/INativeBrokerPlugin.d.ts +6 -6
  41. package/dist/broker/nativeBroker/INativeBrokerPlugin.d.ts.map +1 -1
  42. package/dist/cache/CacheManager.d.ts +18 -18
  43. package/dist/cache/CacheManager.d.ts.map +1 -1
  44. package/dist/cache/CacheManager.mjs +1 -1
  45. package/dist/cache/entities/AccessTokenEntity.d.ts +2 -2
  46. package/dist/cache/entities/AccessTokenEntity.d.ts.map +1 -1
  47. package/dist/cache/entities/AccountEntity.d.ts +6 -6
  48. package/dist/cache/entities/AccountEntity.d.ts.map +1 -1
  49. package/dist/cache/entities/AccountEntity.mjs +1 -1
  50. package/dist/cache/entities/CacheRecord.d.ts +5 -5
  51. package/dist/cache/entities/CacheRecord.d.ts.map +1 -1
  52. package/dist/cache/entities/CredentialEntity.d.ts +1 -1
  53. package/dist/cache/entities/CredentialEntity.d.ts.map +1 -1
  54. package/dist/cache/entities/IdTokenEntity.d.ts +1 -1
  55. package/dist/cache/entities/IdTokenEntity.d.ts.map +1 -1
  56. package/dist/cache/entities/RefreshTokenEntity.d.ts +1 -1
  57. package/dist/cache/entities/RefreshTokenEntity.d.ts.map +1 -1
  58. package/dist/cache/interface/ICacheManager.d.ts +12 -12
  59. package/dist/cache/interface/ICacheManager.d.ts.map +1 -1
  60. package/dist/cache/interface/ICachePlugin.d.ts +1 -1
  61. package/dist/cache/interface/ICachePlugin.d.ts.map +1 -1
  62. package/dist/cache/persistence/TokenCacheContext.d.ts +1 -1
  63. package/dist/cache/persistence/TokenCacheContext.d.ts.map +1 -1
  64. package/dist/cache/persistence/TokenCacheContext.mjs +1 -1
  65. package/dist/cache/utils/CacheHelpers.d.ts +9 -9
  66. package/dist/cache/utils/CacheHelpers.d.ts.map +1 -1
  67. package/dist/cache/utils/CacheHelpers.mjs +1 -1
  68. package/dist/cache/utils/CacheTypes.d.ts +11 -11
  69. package/dist/cache/utils/CacheTypes.d.ts.map +1 -1
  70. package/dist/client/AuthorizationCodeClient.d.ts +10 -9
  71. package/dist/client/AuthorizationCodeClient.d.ts.map +1 -1
  72. package/dist/client/AuthorizationCodeClient.mjs +13 -5
  73. package/dist/client/AuthorizationCodeClient.mjs.map +1 -1
  74. package/dist/client/BaseClient.d.ts +13 -13
  75. package/dist/client/BaseClient.d.ts.map +1 -1
  76. package/dist/client/BaseClient.mjs +1 -1
  77. package/dist/client/RefreshTokenClient.d.ts +6 -6
  78. package/dist/client/RefreshTokenClient.d.ts.map +1 -1
  79. package/dist/client/RefreshTokenClient.mjs +1 -1
  80. package/dist/client/SilentFlowClient.d.ts +6 -6
  81. package/dist/client/SilentFlowClient.d.ts.map +1 -1
  82. package/dist/client/SilentFlowClient.mjs +1 -1
  83. package/dist/config/ClientConfiguration.d.ts +13 -11
  84. package/dist/config/ClientConfiguration.d.ts.map +1 -1
  85. package/dist/config/ClientConfiguration.mjs +2 -1
  86. package/dist/config/ClientConfiguration.mjs.map +1 -1
  87. package/dist/constants/AADServerParamKeys.mjs +1 -1
  88. package/dist/crypto/ICrypto.d.ts +2 -2
  89. package/dist/crypto/ICrypto.d.ts.map +1 -1
  90. package/dist/crypto/ICrypto.mjs +1 -1
  91. package/dist/crypto/JoseHeader.d.ts +1 -1
  92. package/dist/crypto/JoseHeader.d.ts.map +1 -1
  93. package/dist/crypto/JoseHeader.mjs +1 -1
  94. package/dist/crypto/PopTokenGenerator.d.ts +3 -3
  95. package/dist/crypto/PopTokenGenerator.d.ts.map +1 -1
  96. package/dist/crypto/PopTokenGenerator.mjs +1 -1
  97. package/dist/crypto/SignedHttpRequest.d.ts +1 -1
  98. package/dist/crypto/SignedHttpRequest.d.ts.map +1 -1
  99. package/dist/error/AuthError.d.ts +1 -1
  100. package/dist/error/AuthError.d.ts.map +1 -1
  101. package/dist/error/AuthError.mjs +1 -1
  102. package/dist/error/AuthErrorCodes.mjs +1 -1
  103. package/dist/error/CacheError.d.ts +1 -1
  104. package/dist/error/CacheError.d.ts.map +1 -1
  105. package/dist/error/CacheError.mjs +1 -1
  106. package/dist/error/CacheErrorCodes.mjs +1 -1
  107. package/dist/error/ClientAuthError.d.ts +2 -2
  108. package/dist/error/ClientAuthError.d.ts.map +1 -1
  109. package/dist/error/ClientAuthError.mjs +1 -1
  110. package/dist/error/ClientAuthErrorCodes.mjs +1 -1
  111. package/dist/error/ClientConfigurationError.d.ts +2 -2
  112. package/dist/error/ClientConfigurationError.d.ts.map +1 -1
  113. package/dist/error/ClientConfigurationError.mjs +1 -1
  114. package/dist/error/ClientConfigurationErrorCodes.mjs +1 -1
  115. package/dist/error/InteractionRequiredAuthError.d.ts +2 -2
  116. package/dist/error/InteractionRequiredAuthError.d.ts.map +1 -1
  117. package/dist/error/InteractionRequiredAuthError.mjs +1 -1
  118. package/dist/error/InteractionRequiredAuthErrorCodes.mjs +1 -1
  119. package/dist/error/JoseHeaderError.d.ts +2 -2
  120. package/dist/error/JoseHeaderError.d.ts.map +1 -1
  121. package/dist/error/JoseHeaderError.mjs +1 -1
  122. package/dist/error/JoseHeaderErrorCodes.mjs +1 -1
  123. package/dist/error/ServerError.d.ts +1 -1
  124. package/dist/error/ServerError.d.ts.map +1 -1
  125. package/dist/error/ServerError.mjs +1 -1
  126. package/dist/exports-browser-only.d.ts +10 -0
  127. package/dist/exports-browser-only.d.ts.map +1 -0
  128. package/dist/exports-common.d.ts +80 -0
  129. package/dist/exports-common.d.ts.map +1 -0
  130. package/dist/exports-node-only.d.ts +18 -0
  131. package/dist/exports-node-only.d.ts.map +1 -0
  132. package/dist/index-browser.d.ts +7 -0
  133. package/dist/index-browser.d.ts.map +1 -0
  134. package/dist/index-browser.mjs +67 -0
  135. package/dist/index-browser.mjs.map +1 -0
  136. package/dist/index-node.d.ts +7 -0
  137. package/dist/index-node.d.ts.map +1 -0
  138. package/dist/index-node.mjs +66 -0
  139. package/dist/index-node.mjs.map +1 -0
  140. package/dist/index.d.ts +7 -103
  141. package/dist/index.d.ts.map +1 -1
  142. package/dist/index.mjs +30 -30
  143. package/dist/logger/Logger.d.ts +1 -1
  144. package/dist/logger/Logger.d.ts.map +1 -1
  145. package/dist/logger/Logger.mjs +1 -1
  146. package/dist/network/INetworkModule.d.ts +1 -1
  147. package/dist/network/INetworkModule.d.ts.map +1 -1
  148. package/dist/network/INetworkModule.mjs +1 -1
  149. package/dist/network/NetworkManager.d.ts +4 -4
  150. package/dist/network/NetworkManager.d.ts.map +1 -1
  151. package/dist/network/NetworkManager.mjs +1 -1
  152. package/dist/network/RequestThumbprint.d.ts +2 -2
  153. package/dist/network/RequestThumbprint.d.ts.map +1 -1
  154. package/dist/network/ThrottlingUtils.d.ts +5 -5
  155. package/dist/network/ThrottlingUtils.d.ts.map +1 -1
  156. package/dist/network/ThrottlingUtils.mjs +1 -1
  157. package/dist/packageMetadata.d.ts +1 -1
  158. package/dist/packageMetadata.mjs +2 -2
  159. package/dist/request/AuthenticationHeaderParser.mjs +1 -1
  160. package/dist/request/BaseAuthRequest.d.ts +5 -5
  161. package/dist/request/BaseAuthRequest.d.ts.map +1 -1
  162. package/dist/request/CommonAuthorizationCodeRequest.d.ts +3 -3
  163. package/dist/request/CommonAuthorizationCodeRequest.d.ts.map +1 -1
  164. package/dist/request/CommonAuthorizationUrlRequest.d.ts +4 -4
  165. package/dist/request/CommonAuthorizationUrlRequest.d.ts.map +1 -1
  166. package/dist/request/CommonClientCredentialRequest.d.ts +3 -3
  167. package/dist/request/CommonClientCredentialRequest.d.ts.map +1 -1
  168. package/dist/request/CommonDeviceCodeRequest.d.ts +3 -3
  169. package/dist/request/CommonDeviceCodeRequest.d.ts.map +1 -1
  170. package/dist/request/CommonEndSessionRequest.d.ts +2 -2
  171. package/dist/request/CommonEndSessionRequest.d.ts.map +1 -1
  172. package/dist/request/CommonOnBehalfOfRequest.d.ts +1 -1
  173. package/dist/request/CommonOnBehalfOfRequest.d.ts.map +1 -1
  174. package/dist/request/CommonRefreshTokenRequest.d.ts +3 -3
  175. package/dist/request/CommonRefreshTokenRequest.d.ts.map +1 -1
  176. package/dist/request/CommonSilentFlowRequest.d.ts +3 -3
  177. package/dist/request/CommonSilentFlowRequest.d.ts.map +1 -1
  178. package/dist/request/CommonUsernamePasswordRequest.d.ts +1 -1
  179. package/dist/request/CommonUsernamePasswordRequest.d.ts.map +1 -1
  180. package/dist/request/NativeRequest.d.ts +1 -1
  181. package/dist/request/NativeRequest.d.ts.map +1 -1
  182. package/dist/request/RequestParameterBuilder.d.ts +5 -5
  183. package/dist/request/RequestParameterBuilder.d.ts.map +1 -1
  184. package/dist/request/RequestParameterBuilder.mjs +1 -1
  185. package/dist/request/RequestValidator.mjs +1 -1
  186. package/dist/request/ScopeSet.mjs +1 -1
  187. package/dist/response/AuthenticationResult.d.ts +1 -1
  188. package/dist/response/AuthenticationResult.d.ts.map +1 -1
  189. package/dist/response/ExternalTokenResponse.d.ts +1 -1
  190. package/dist/response/ExternalTokenResponse.d.ts.map +1 -1
  191. package/dist/response/ResponseHandler.d.ts +16 -16
  192. package/dist/response/ResponseHandler.d.ts.map +1 -1
  193. package/dist/response/ResponseHandler.mjs +1 -1
  194. package/dist/response/ServerAuthorizationTokenResponse.d.ts +1 -1
  195. package/dist/response/ServerAuthorizationTokenResponse.d.ts.map +1 -1
  196. package/dist/telemetry/performance/IPerformanceClient.d.ts +2 -2
  197. package/dist/telemetry/performance/IPerformanceClient.d.ts.map +1 -1
  198. package/dist/telemetry/performance/PerformanceClient.d.ts +5 -5
  199. package/dist/telemetry/performance/PerformanceClient.d.ts.map +1 -1
  200. package/dist/telemetry/performance/PerformanceClient.mjs +1 -1
  201. package/dist/telemetry/performance/PerformanceEvent.d.ts +0 -4
  202. package/dist/telemetry/performance/PerformanceEvent.d.ts.map +1 -1
  203. package/dist/telemetry/performance/PerformanceEvent.mjs +1 -5
  204. package/dist/telemetry/performance/PerformanceEvent.mjs.map +1 -1
  205. package/dist/telemetry/performance/StubPerformanceClient.d.ts +3 -3
  206. package/dist/telemetry/performance/StubPerformanceClient.d.ts.map +1 -1
  207. package/dist/telemetry/performance/StubPerformanceClient.mjs +1 -1
  208. package/dist/telemetry/performance/StubPerformanceClient.mjs.map +1 -1
  209. package/dist/telemetry/server/ServerTelemetryManager.d.ts +5 -5
  210. package/dist/telemetry/server/ServerTelemetryManager.d.ts.map +1 -1
  211. package/dist/telemetry/server/ServerTelemetryManager.mjs +1 -1
  212. package/dist/url/UrlString.d.ts +1 -1
  213. package/dist/url/UrlString.d.ts.map +1 -1
  214. package/dist/url/UrlString.mjs +1 -1
  215. package/dist/utils/ClientAssertionUtils.d.ts +1 -1
  216. package/dist/utils/ClientAssertionUtils.d.ts.map +1 -1
  217. package/dist/utils/ClientAssertionUtils.mjs +1 -1
  218. package/dist/utils/Constants.mjs +1 -1
  219. package/dist/utils/FunctionWrappers.d.ts +2 -2
  220. package/dist/utils/FunctionWrappers.d.ts.map +1 -1
  221. package/dist/utils/FunctionWrappers.mjs +1 -1
  222. package/dist/utils/ProtocolUtils.d.ts +1 -1
  223. package/dist/utils/ProtocolUtils.d.ts.map +1 -1
  224. package/dist/utils/ProtocolUtils.mjs +1 -1
  225. package/dist/utils/StringUtils.mjs +1 -1
  226. package/dist/utils/TimeUtils.mjs +1 -1
  227. package/dist/utils/UrlUtils.d.ts +1 -1
  228. package/dist/utils/UrlUtils.d.ts.map +1 -1
  229. package/dist/utils/UrlUtils.mjs +1 -1
  230. package/lib/index-browser.cjs +838 -0
  231. package/lib/index-browser.cjs.map +1 -0
  232. package/{dist/index.cjs → lib/index-node-aee3f7b6.js} +39 -769
  233. package/lib/index-node-aee3f7b6.js.map +1 -0
  234. package/lib/index-node.cjs +103 -0
  235. package/lib/index-node.cjs.map +1 -0
  236. package/lib/index.cjs +111 -0
  237. package/lib/index.cjs.map +1 -0
  238. package/lib/package.json +1 -0
  239. package/lib/types/account/AccountInfo.d.ts +67 -0
  240. package/lib/types/account/AccountInfo.d.ts.map +1 -0
  241. package/lib/types/account/AuthToken.d.ts +18 -0
  242. package/lib/types/account/AuthToken.d.ts.map +1 -0
  243. package/lib/types/account/CcsCredential.d.ts +10 -0
  244. package/lib/types/account/CcsCredential.d.ts.map +1 -0
  245. package/lib/types/account/ClientCredentials.d.ts +20 -0
  246. package/lib/types/account/ClientCredentials.d.ts.map +1 -0
  247. package/lib/types/account/ClientInfo.d.ts +19 -0
  248. package/lib/types/account/ClientInfo.d.ts.map +1 -0
  249. package/lib/types/account/TokenClaims.d.ts +84 -0
  250. package/lib/types/account/TokenClaims.d.ts.map +1 -0
  251. package/lib/types/authority/Authority.d.ts +255 -0
  252. package/lib/types/authority/Authority.d.ts.map +1 -0
  253. package/lib/types/authority/AuthorityFactory.d.ts +19 -0
  254. package/lib/types/authority/AuthorityFactory.d.ts.map +1 -0
  255. package/lib/types/authority/AuthorityMetadata.d.ts +44 -0
  256. package/lib/types/authority/AuthorityMetadata.d.ts.map +1 -0
  257. package/lib/types/authority/AuthorityOptions.d.ts +28 -0
  258. package/lib/types/authority/AuthorityOptions.d.ts.map +1 -0
  259. package/lib/types/authority/AuthorityType.d.ts +11 -0
  260. package/lib/types/authority/AuthorityType.d.ts.map +1 -0
  261. package/lib/types/authority/AzureRegion.d.ts +2 -0
  262. package/lib/types/authority/AzureRegion.d.ts.map +1 -0
  263. package/lib/types/authority/AzureRegionConfiguration.d.ts +6 -0
  264. package/lib/types/authority/AzureRegionConfiguration.d.ts.map +1 -0
  265. package/lib/types/authority/CloudDiscoveryMetadata.d.ts +6 -0
  266. package/lib/types/authority/CloudDiscoveryMetadata.d.ts.map +1 -0
  267. package/lib/types/authority/CloudInstanceDiscoveryErrorResponse.d.ts +14 -0
  268. package/lib/types/authority/CloudInstanceDiscoveryErrorResponse.d.ts.map +1 -0
  269. package/lib/types/authority/CloudInstanceDiscoveryResponse.d.ts +10 -0
  270. package/lib/types/authority/CloudInstanceDiscoveryResponse.d.ts.map +1 -0
  271. package/lib/types/authority/ImdsOptions.d.ts +6 -0
  272. package/lib/types/authority/ImdsOptions.d.ts.map +1 -0
  273. package/lib/types/authority/OIDCOptions.d.ts +9 -0
  274. package/lib/types/authority/OIDCOptions.d.ts.map +1 -0
  275. package/lib/types/authority/OpenIdConfigResponse.d.ts +12 -0
  276. package/lib/types/authority/OpenIdConfigResponse.d.ts.map +1 -0
  277. package/lib/types/authority/ProtocolMode.d.ts +9 -0
  278. package/lib/types/authority/ProtocolMode.d.ts.map +1 -0
  279. package/lib/types/authority/RegionDiscovery.d.ts +33 -0
  280. package/lib/types/authority/RegionDiscovery.d.ts.map +1 -0
  281. package/lib/types/authority/RegionDiscoveryMetadata.d.ts +7 -0
  282. package/lib/types/authority/RegionDiscoveryMetadata.d.ts.map +1 -0
  283. package/lib/types/broker/nativeBroker/INativeBrokerPlugin.d.ts +16 -0
  284. package/lib/types/broker/nativeBroker/INativeBrokerPlugin.d.ts.map +1 -0
  285. package/lib/types/cache/CacheManager.d.ts +498 -0
  286. package/lib/types/cache/CacheManager.d.ts.map +1 -0
  287. package/lib/types/cache/entities/AccessTokenEntity.d.ts +26 -0
  288. package/lib/types/cache/entities/AccessTokenEntity.d.ts.map +1 -0
  289. package/lib/types/cache/entities/AccountEntity.d.ts +107 -0
  290. package/lib/types/cache/entities/AccountEntity.d.ts.map +1 -0
  291. package/lib/types/cache/entities/AppMetadataEntity.d.ts +12 -0
  292. package/lib/types/cache/entities/AppMetadataEntity.d.ts.map +1 -0
  293. package/lib/types/cache/entities/AuthorityMetadataEntity.d.ts +16 -0
  294. package/lib/types/cache/entities/AuthorityMetadataEntity.d.ts.map +1 -0
  295. package/lib/types/cache/entities/CacheRecord.d.ts +14 -0
  296. package/lib/types/cache/entities/CacheRecord.d.ts.map +1 -0
  297. package/lib/types/cache/entities/CredentialEntity.d.ts +31 -0
  298. package/lib/types/cache/entities/CredentialEntity.d.ts.map +1 -0
  299. package/lib/types/cache/entities/IdTokenEntity.d.ts +9 -0
  300. package/lib/types/cache/entities/IdTokenEntity.d.ts.map +1 -0
  301. package/lib/types/cache/entities/RefreshTokenEntity.d.ts +8 -0
  302. package/lib/types/cache/entities/RefreshTokenEntity.d.ts.map +1 -0
  303. package/lib/types/cache/entities/ServerTelemetryEntity.d.ts +7 -0
  304. package/lib/types/cache/entities/ServerTelemetryEntity.d.ts.map +1 -0
  305. package/lib/types/cache/entities/ThrottlingEntity.d.ts +8 -0
  306. package/lib/types/cache/entities/ThrottlingEntity.d.ts.map +1 -0
  307. package/lib/types/cache/interface/ICacheManager.d.ts +167 -0
  308. package/lib/types/cache/interface/ICacheManager.d.ts.map +1 -0
  309. package/lib/types/cache/interface/ICachePlugin.d.ts +6 -0
  310. package/lib/types/cache/interface/ICachePlugin.d.ts.map +1 -0
  311. package/lib/types/cache/interface/ISerializableTokenCache.d.ts +5 -0
  312. package/lib/types/cache/interface/ISerializableTokenCache.d.ts.map +1 -0
  313. package/lib/types/cache/persistence/TokenCacheContext.d.ts +24 -0
  314. package/lib/types/cache/persistence/TokenCacheContext.d.ts.map +1 -0
  315. package/lib/types/cache/utils/CacheHelpers.d.ts +95 -0
  316. package/lib/types/cache/utils/CacheHelpers.d.ts.map +1 -0
  317. package/lib/types/cache/utils/CacheTypes.d.ts +70 -0
  318. package/lib/types/cache/utils/CacheTypes.d.ts.map +1 -0
  319. package/lib/types/client/AuthorizationCodeClient.d.ts +76 -0
  320. package/lib/types/client/AuthorizationCodeClient.d.ts.map +1 -0
  321. package/lib/types/client/BaseClient.d.ts +52 -0
  322. package/lib/types/client/BaseClient.d.ts.map +1 -0
  323. package/lib/types/client/RefreshTokenClient.d.ts +36 -0
  324. package/lib/types/client/RefreshTokenClient.d.ts.map +1 -0
  325. package/lib/types/client/SilentFlowClient.d.ts +28 -0
  326. package/lib/types/client/SilentFlowClient.d.ts.map +1 -0
  327. package/lib/types/config/AppTokenProvider.d.ts +39 -0
  328. package/lib/types/config/AppTokenProvider.d.ts.map +1 -0
  329. package/lib/types/config/ClientConfiguration.d.ts +153 -0
  330. package/lib/types/config/ClientConfiguration.d.ts.map +1 -0
  331. package/lib/types/constants/AADServerParamKeys.d.ts +54 -0
  332. package/lib/types/constants/AADServerParamKeys.d.ts.map +1 -0
  333. package/lib/types/crypto/ICrypto.d.ts +69 -0
  334. package/lib/types/crypto/ICrypto.d.ts.map +1 -0
  335. package/lib/types/crypto/IGuidGenerator.d.ts +5 -0
  336. package/lib/types/crypto/IGuidGenerator.d.ts.map +1 -0
  337. package/lib/types/crypto/JoseHeader.d.ts +23 -0
  338. package/lib/types/crypto/JoseHeader.d.ts.map +1 -0
  339. package/lib/types/crypto/PopTokenGenerator.d.ts +60 -0
  340. package/lib/types/crypto/PopTokenGenerator.d.ts.map +1 -0
  341. package/lib/types/crypto/SignedHttpRequest.d.ts +16 -0
  342. package/lib/types/crypto/SignedHttpRequest.d.ts.map +1 -0
  343. package/lib/types/error/AuthError.d.ts +45 -0
  344. package/lib/types/error/AuthError.d.ts.map +1 -0
  345. package/lib/types/error/AuthErrorCodes.d.ts +6 -0
  346. package/lib/types/error/AuthErrorCodes.d.ts.map +1 -0
  347. package/lib/types/error/CacheError.d.ts +21 -0
  348. package/lib/types/error/CacheError.d.ts.map +1 -0
  349. package/lib/types/error/CacheErrorCodes.d.ts +3 -0
  350. package/lib/types/error/CacheErrorCodes.d.ts.map +1 -0
  351. package/lib/types/error/ClientAuthError.d.ts +238 -0
  352. package/lib/types/error/ClientAuthError.d.ts.map +1 -0
  353. package/lib/types/error/ClientAuthErrorCodes.d.ts +45 -0
  354. package/lib/types/error/ClientAuthErrorCodes.d.ts.map +1 -0
  355. package/lib/types/error/ClientConfigurationError.d.ts +129 -0
  356. package/lib/types/error/ClientConfigurationError.d.ts.map +1 -0
  357. package/lib/types/error/ClientConfigurationErrorCodes.d.ts +23 -0
  358. package/lib/types/error/ClientConfigurationErrorCodes.d.ts.map +1 -0
  359. package/lib/types/error/InteractionRequiredAuthError.d.ts +66 -0
  360. package/lib/types/error/InteractionRequiredAuthError.d.ts.map +1 -0
  361. package/lib/types/error/InteractionRequiredAuthErrorCodes.d.ts +8 -0
  362. package/lib/types/error/InteractionRequiredAuthErrorCodes.d.ts.map +1 -0
  363. package/lib/types/error/JoseHeaderError.d.ts +16 -0
  364. package/lib/types/error/JoseHeaderError.d.ts.map +1 -0
  365. package/lib/types/error/JoseHeaderErrorCodes.d.ts +3 -0
  366. package/lib/types/error/JoseHeaderErrorCodes.d.ts.map +1 -0
  367. package/lib/types/error/ServerError.d.ts +16 -0
  368. package/lib/types/error/ServerError.d.ts.map +1 -0
  369. package/lib/types/exports-browser-only.d.ts +10 -0
  370. package/lib/types/exports-browser-only.d.ts.map +1 -0
  371. package/lib/types/exports-common.d.ts +80 -0
  372. package/lib/types/exports-common.d.ts.map +1 -0
  373. package/lib/types/exports-node-only.d.ts +18 -0
  374. package/lib/types/exports-node-only.d.ts.map +1 -0
  375. package/lib/types/index-browser.d.ts +7 -0
  376. package/lib/types/index-browser.d.ts.map +1 -0
  377. package/lib/types/index-node.d.ts +7 -0
  378. package/lib/types/index-node.d.ts.map +1 -0
  379. package/lib/types/index.d.ts +12 -0
  380. package/lib/types/index.d.ts.map +1 -0
  381. package/lib/types/logger/Logger.d.ts +96 -0
  382. package/lib/types/logger/Logger.d.ts.map +1 -0
  383. package/lib/types/network/INetworkModule.d.ts +30 -0
  384. package/lib/types/network/INetworkModule.d.ts.map +1 -0
  385. package/lib/types/network/NetworkManager.d.ts +34 -0
  386. package/lib/types/network/NetworkManager.d.ts.map +1 -0
  387. package/lib/types/network/RequestThumbprint.d.ts +19 -0
  388. package/lib/types/network/RequestThumbprint.d.ts.map +1 -0
  389. package/lib/types/network/ThrottlingUtils.d.ts +43 -0
  390. package/lib/types/network/ThrottlingUtils.d.ts.map +1 -0
  391. package/lib/types/packageMetadata.d.ts +3 -0
  392. package/lib/types/packageMetadata.d.ts.map +1 -0
  393. package/lib/types/request/AuthenticationHeaderParser.d.ts +20 -0
  394. package/lib/types/request/AuthenticationHeaderParser.d.ts.map +1 -0
  395. package/lib/types/request/BaseAuthRequest.d.ts +48 -0
  396. package/lib/types/request/BaseAuthRequest.d.ts.map +1 -0
  397. package/lib/types/request/CommonAuthorizationCodeRequest.d.ts +28 -0
  398. package/lib/types/request/CommonAuthorizationCodeRequest.d.ts.map +1 -0
  399. package/lib/types/request/CommonAuthorizationUrlRequest.d.ts +51 -0
  400. package/lib/types/request/CommonAuthorizationUrlRequest.d.ts.map +1 -0
  401. package/lib/types/request/CommonClientCredentialRequest.d.ts +18 -0
  402. package/lib/types/request/CommonClientCredentialRequest.d.ts.map +1 -0
  403. package/lib/types/request/CommonDeviceCodeRequest.d.ts +22 -0
  404. package/lib/types/request/CommonDeviceCodeRequest.d.ts.map +1 -0
  405. package/lib/types/request/CommonEndSessionRequest.d.ts +22 -0
  406. package/lib/types/request/CommonEndSessionRequest.d.ts.map +1 -0
  407. package/lib/types/request/CommonOnBehalfOfRequest.d.ts +14 -0
  408. package/lib/types/request/CommonOnBehalfOfRequest.d.ts.map +1 -0
  409. package/lib/types/request/CommonRefreshTokenRequest.d.ts +23 -0
  410. package/lib/types/request/CommonRefreshTokenRequest.d.ts.map +1 -0
  411. package/lib/types/request/CommonSilentFlowRequest.d.ts +28 -0
  412. package/lib/types/request/CommonSilentFlowRequest.d.ts.map +1 -0
  413. package/lib/types/request/CommonUsernamePasswordRequest.d.ts +18 -0
  414. package/lib/types/request/CommonUsernamePasswordRequest.d.ts.map +1 -0
  415. package/lib/types/request/NativeRequest.d.ts +20 -0
  416. package/lib/types/request/NativeRequest.d.ts.map +1 -0
  417. package/lib/types/request/NativeSignOutRequest.d.ts +6 -0
  418. package/lib/types/request/NativeSignOutRequest.d.ts.map +1 -0
  419. package/lib/types/request/RequestParameterBuilder.d.ts +218 -0
  420. package/lib/types/request/RequestParameterBuilder.d.ts.map +1 -0
  421. package/lib/types/request/RequestValidator.d.ts +28 -0
  422. package/lib/types/request/RequestValidator.d.ts.map +1 -0
  423. package/lib/types/request/ScopeSet.d.ts +89 -0
  424. package/lib/types/request/ScopeSet.d.ts.map +1 -0
  425. package/lib/types/request/StoreInCache.d.ts +9 -0
  426. package/lib/types/request/StoreInCache.d.ts.map +1 -0
  427. package/lib/types/response/AuthenticationResult.d.ts +42 -0
  428. package/lib/types/response/AuthenticationResult.d.ts.map +1 -0
  429. package/lib/types/response/AuthorizationCodePayload.d.ts +14 -0
  430. package/lib/types/response/AuthorizationCodePayload.d.ts.map +1 -0
  431. package/lib/types/response/DeviceCodeResponse.d.ts +26 -0
  432. package/lib/types/response/DeviceCodeResponse.d.ts.map +1 -0
  433. package/lib/types/response/ExternalTokenResponse.d.ts +16 -0
  434. package/lib/types/response/ExternalTokenResponse.d.ts.map +1 -0
  435. package/lib/types/response/IMDSBadResponse.d.ts +5 -0
  436. package/lib/types/response/IMDSBadResponse.d.ts.map +1 -0
  437. package/lib/types/response/ResponseHandler.d.ts +70 -0
  438. package/lib/types/response/ResponseHandler.d.ts.map +1 -0
  439. package/lib/types/response/ServerAuthorizationCodeResponse.d.ts +27 -0
  440. package/lib/types/response/ServerAuthorizationCodeResponse.d.ts.map +1 -0
  441. package/lib/types/response/ServerAuthorizationTokenResponse.d.ts +48 -0
  442. package/lib/types/response/ServerAuthorizationTokenResponse.d.ts.map +1 -0
  443. package/lib/types/telemetry/performance/IPerformanceClient.d.ts +58 -0
  444. package/lib/types/telemetry/performance/IPerformanceClient.d.ts.map +1 -0
  445. package/lib/types/telemetry/performance/IPerformanceMeasurement.d.ts +6 -0
  446. package/lib/types/telemetry/performance/IPerformanceMeasurement.d.ts.map +1 -0
  447. package/lib/types/telemetry/performance/PerformanceClient.d.ts +243 -0
  448. package/lib/types/telemetry/performance/PerformanceClient.d.ts.map +1 -0
  449. package/lib/types/telemetry/performance/PerformanceEvent.d.ts +512 -0
  450. package/lib/types/telemetry/performance/PerformanceEvent.d.ts.map +1 -0
  451. package/lib/types/telemetry/performance/StubPerformanceClient.d.ts +25 -0
  452. package/lib/types/telemetry/performance/StubPerformanceClient.d.ts.map +1 -0
  453. package/lib/types/telemetry/server/ServerTelemetryManager.d.ts +79 -0
  454. package/lib/types/telemetry/server/ServerTelemetryManager.d.ts.map +1 -0
  455. package/lib/types/telemetry/server/ServerTelemetryRequest.d.ts +9 -0
  456. package/lib/types/telemetry/server/ServerTelemetryRequest.d.ts.map +1 -0
  457. package/lib/types/url/IUri.d.ts +13 -0
  458. package/lib/types/url/IUri.d.ts.map +1 -0
  459. package/lib/types/url/UrlString.d.ts +49 -0
  460. package/lib/types/url/UrlString.d.ts.map +1 -0
  461. package/lib/types/utils/ClientAssertionUtils.d.ts +3 -0
  462. package/lib/types/utils/ClientAssertionUtils.d.ts.map +1 -0
  463. package/lib/types/utils/Constants.d.ts +310 -0
  464. package/lib/types/utils/Constants.d.ts.map +1 -0
  465. package/lib/types/utils/FunctionWrappers.d.ts +28 -0
  466. package/lib/types/utils/FunctionWrappers.d.ts.map +1 -0
  467. package/lib/types/utils/MsalTypes.d.ts +7 -0
  468. package/lib/types/utils/MsalTypes.d.ts.map +1 -0
  469. package/lib/types/utils/ProtocolUtils.d.ts +43 -0
  470. package/lib/types/utils/ProtocolUtils.d.ts.map +1 -0
  471. package/lib/types/utils/StringUtils.d.ts +41 -0
  472. package/lib/types/utils/StringUtils.d.ts.map +1 -0
  473. package/lib/types/utils/TimeUtils.d.ts +26 -0
  474. package/lib/types/utils/TimeUtils.d.ts.map +1 -0
  475. package/lib/types/utils/UrlUtils.d.ts +11 -0
  476. package/lib/types/utils/UrlUtils.d.ts.map +1 -0
  477. package/node/README.md +1 -0
  478. package/node/package.json +5 -0
  479. package/package.json +37 -8
  480. package/src/account/AccountInfo.ts +1 -1
  481. package/src/account/AuthToken.ts +2 -2
  482. package/src/account/ClientInfo.ts +2 -2
  483. package/src/authority/Authority.ts +26 -26
  484. package/src/authority/AuthorityFactory.ts +9 -9
  485. package/src/authority/AuthorityMetadata.ts +7 -7
  486. package/src/authority/AuthorityOptions.ts +4 -4
  487. package/src/authority/AzureRegionConfiguration.ts +1 -1
  488. package/src/authority/CloudInstanceDiscoveryResponse.ts +1 -1
  489. package/src/authority/OIDCOptions.ts +1 -1
  490. package/src/authority/RegionDiscovery.ts +10 -10
  491. package/src/authority/RegionDiscoveryMetadata.ts +1 -1
  492. package/src/broker/nativeBroker/INativeBrokerPlugin.ts +5 -5
  493. package/src/cache/CacheManager.ts +28 -28
  494. package/src/cache/entities/AccessTokenEntity.ts +2 -2
  495. package/src/cache/entities/AccountEntity.ts +10 -10
  496. package/src/cache/entities/CacheRecord.ts +5 -5
  497. package/src/cache/entities/CredentialEntity.ts +1 -1
  498. package/src/cache/entities/IdTokenEntity.ts +1 -1
  499. package/src/cache/entities/RefreshTokenEntity.ts +1 -1
  500. package/src/cache/interface/ICacheManager.ts +12 -12
  501. package/src/cache/interface/ICachePlugin.ts +1 -1
  502. package/src/cache/persistence/TokenCacheContext.ts +1 -1
  503. package/src/cache/utils/CacheHelpers.ts +13 -13
  504. package/src/cache/utils/CacheTypes.ts +11 -11
  505. package/src/client/AuthorizationCodeClient.ts +51 -38
  506. package/src/client/BaseClient.ts +19 -19
  507. package/src/client/RefreshTokenClient.ts +29 -29
  508. package/src/client/SilentFlowClient.ts +17 -17
  509. package/src/config/ClientConfiguration.ts +18 -15
  510. package/src/crypto/ICrypto.ts +3 -3
  511. package/src/crypto/JoseHeader.ts +2 -2
  512. package/src/crypto/PopTokenGenerator.ts +7 -7
  513. package/src/crypto/SignedHttpRequest.ts +1 -1
  514. package/src/error/AuthError.ts +2 -2
  515. package/src/error/CacheError.ts +1 -1
  516. package/src/error/ClientAuthError.ts +2 -2
  517. package/src/error/ClientConfigurationError.ts +2 -2
  518. package/src/error/InteractionRequiredAuthError.ts +3 -3
  519. package/src/error/JoseHeaderError.ts +2 -2
  520. package/src/error/ServerError.ts +1 -1
  521. package/src/exports-browser-only.ts +29 -0
  522. package/src/exports-common.ts +192 -0
  523. package/src/exports-node-only.ts +35 -0
  524. package/src/index-browser.ts +11 -0
  525. package/src/index-node.ts +11 -0
  526. package/src/index.ts +7 -250
  527. package/src/logger/Logger.ts +2 -2
  528. package/src/network/INetworkModule.ts +2 -2
  529. package/src/network/NetworkManager.ts +7 -7
  530. package/src/network/RequestThumbprint.ts +2 -2
  531. package/src/network/ThrottlingUtils.ts +8 -8
  532. package/src/packageMetadata.ts +1 -1
  533. package/src/request/AuthenticationHeaderParser.ts +2 -2
  534. package/src/request/BaseAuthRequest.ts +5 -5
  535. package/src/request/CommonAuthorizationCodeRequest.ts +3 -3
  536. package/src/request/CommonAuthorizationUrlRequest.ts +4 -4
  537. package/src/request/CommonClientCredentialRequest.ts +3 -3
  538. package/src/request/CommonDeviceCodeRequest.ts +3 -3
  539. package/src/request/CommonEndSessionRequest.ts +2 -2
  540. package/src/request/CommonOnBehalfOfRequest.ts +1 -1
  541. package/src/request/CommonRefreshTokenRequest.ts +3 -3
  542. package/src/request/CommonSilentFlowRequest.ts +3 -3
  543. package/src/request/CommonUsernamePasswordRequest.ts +1 -1
  544. package/src/request/NativeRequest.ts +1 -1
  545. package/src/request/RequestParameterBuilder.ts +9 -9
  546. package/src/request/RequestValidator.ts +2 -2
  547. package/src/request/ScopeSet.ts +4 -4
  548. package/src/response/AuthenticationResult.ts +1 -1
  549. package/src/response/ExternalTokenResponse.ts +1 -1
  550. package/src/response/ResponseHandler.ts +31 -31
  551. package/src/response/ServerAuthorizationTokenResponse.ts +1 -1
  552. package/src/telemetry/performance/IPerformanceClient.ts +2 -2
  553. package/src/telemetry/performance/PerformanceClient.ts +10 -10
  554. package/src/telemetry/performance/PerformanceEvent.ts +0 -5
  555. package/src/telemetry/performance/StubPerformanceClient.ts +6 -3
  556. package/src/telemetry/server/ServerTelemetryManager.ts +6 -6
  557. package/src/url/UrlString.ts +5 -5
  558. package/src/utils/ClientAssertionUtils.ts +1 -1
  559. package/src/utils/FunctionWrappers.ts +2 -2
  560. package/src/utils/ProtocolUtils.ts +3 -3
  561. package/src/utils/UrlUtils.ts +2 -2
  562. package/dist/index.cjs.map +0 -1
@@ -3,55 +3,55 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
- import { BaseClient } from "./BaseClient";
7
- import { CommonAuthorizationUrlRequest } from "../request/CommonAuthorizationUrlRequest";
8
- import { CommonAuthorizationCodeRequest } from "../request/CommonAuthorizationCodeRequest";
9
- import { Authority } from "../authority/Authority";
10
- import { RequestParameterBuilder } from "../request/RequestParameterBuilder";
6
+ import { BaseClient } from "./BaseClient.js";
7
+ import { CommonAuthorizationUrlRequest } from "../request/CommonAuthorizationUrlRequest.js";
8
+ import { CommonAuthorizationCodeRequest } from "../request/CommonAuthorizationCodeRequest.js";
9
+ import { Authority } from "../authority/Authority.js";
10
+ import { RequestParameterBuilder } from "../request/RequestParameterBuilder.js";
11
11
  import {
12
12
  GrantType,
13
13
  AuthenticationScheme,
14
14
  PromptValue,
15
15
  Separators,
16
16
  HeaderNames,
17
- } from "../utils/Constants";
18
- import * as AADServerParamKeys from "../constants/AADServerParamKeys";
17
+ } from "../utils/Constants.js";
18
+ import * as AADServerParamKeys from "../constants/AADServerParamKeys.js";
19
19
  import {
20
20
  ClientConfiguration,
21
21
  isOidcProtocolMode,
22
- } from "../config/ClientConfiguration";
23
- import { ServerAuthorizationTokenResponse } from "../response/ServerAuthorizationTokenResponse";
24
- import { NetworkResponse } from "../network/NetworkManager";
25
- import { ResponseHandler } from "../response/ResponseHandler";
26
- import { AuthenticationResult } from "../response/AuthenticationResult";
27
- import { StringUtils } from "../utils/StringUtils";
22
+ } from "../config/ClientConfiguration.js";
23
+ import { ServerAuthorizationTokenResponse } from "../response/ServerAuthorizationTokenResponse.js";
24
+ import { NetworkResponse } from "../network/NetworkManager.js";
25
+ import { ResponseHandler } from "../response/ResponseHandler.js";
26
+ import { AuthenticationResult } from "../response/AuthenticationResult.js";
27
+ import { StringUtils } from "../utils/StringUtils.js";
28
28
  import {
29
29
  ClientAuthErrorCodes,
30
30
  createClientAuthError,
31
- } from "../error/ClientAuthError";
32
- import { UrlString } from "../url/UrlString";
33
- import { ServerAuthorizationCodeResponse } from "../response/ServerAuthorizationCodeResponse";
34
- import { CommonEndSessionRequest } from "../request/CommonEndSessionRequest";
35
- import { PopTokenGenerator } from "../crypto/PopTokenGenerator";
36
- import { RequestThumbprint } from "../network/RequestThumbprint";
37
- import { AuthorizationCodePayload } from "../response/AuthorizationCodePayload";
38
- import * as TimeUtils from "../utils/TimeUtils";
39
- import { AccountInfo } from "../account/AccountInfo";
31
+ } from "../error/ClientAuthError.js";
32
+ import { UrlString } from "../url/UrlString.js";
33
+ import { ServerAuthorizationCodeResponse } from "../response/ServerAuthorizationCodeResponse.js";
34
+ import { CommonEndSessionRequest } from "../request/CommonEndSessionRequest.js";
35
+ import { PopTokenGenerator } from "../crypto/PopTokenGenerator.js";
36
+ import { RequestThumbprint } from "../network/RequestThumbprint.js";
37
+ import { AuthorizationCodePayload } from "../response/AuthorizationCodePayload.js";
38
+ import * as TimeUtils from "../utils/TimeUtils.js";
39
+ import { AccountInfo } from "../account/AccountInfo.js";
40
40
  import {
41
41
  buildClientInfoFromHomeAccountId,
42
42
  buildClientInfo,
43
- } from "../account/ClientInfo";
44
- import { CcsCredentialType, CcsCredential } from "../account/CcsCredential";
43
+ } from "../account/ClientInfo.js";
44
+ import { CcsCredentialType, CcsCredential } from "../account/CcsCredential.js";
45
45
  import {
46
46
  createClientConfigurationError,
47
47
  ClientConfigurationErrorCodes,
48
- } from "../error/ClientConfigurationError";
49
- import { RequestValidator } from "../request/RequestValidator";
50
- import { IPerformanceClient } from "../telemetry/performance/IPerformanceClient";
51
- import { PerformanceEvents } from "../telemetry/performance/PerformanceEvent";
52
- import { invokeAsync } from "../utils/FunctionWrappers";
53
- import { ClientAssertion } from "../account/ClientCredentials";
54
- import { getClientAssertion } from "../utils/ClientAssertionUtils";
48
+ } from "../error/ClientConfigurationError.js";
49
+ import { RequestValidator } from "../request/RequestValidator.js";
50
+ import { IPerformanceClient } from "../telemetry/performance/IPerformanceClient.js";
51
+ import { PerformanceEvents } from "../telemetry/performance/PerformanceEvent.js";
52
+ import { invokeAsync } from "../utils/FunctionWrappers.js";
53
+ import { ClientAssertion } from "../account/ClientCredentials.js";
54
+ import { getClientAssertion } from "../utils/ClientAssertionUtils.js";
55
55
 
56
56
  /**
57
57
  * Oauth2.0 Authorization Code client
@@ -674,11 +674,7 @@ export class AuthorizationCodeClient extends BaseClient {
674
674
  );
675
675
  }
676
676
 
677
- if (request.extraQueryParameters) {
678
- parameterBuilder.addExtraQueryParameters(
679
- request.extraQueryParameters
680
- );
681
- }
677
+ this.addExtraQueryParams(request, parameterBuilder);
682
678
 
683
679
  if (request.nativeBroker) {
684
680
  // signal ests that this is a WAM call
@@ -742,13 +738,30 @@ export class AuthorizationCodeClient extends BaseClient {
742
738
  parameterBuilder.addLogoutHint(request.logoutHint);
743
739
  }
744
740
 
741
+ this.addExtraQueryParams(request, parameterBuilder);
742
+
743
+ return parameterBuilder.createQueryString();
744
+ }
745
+
746
+ private addExtraQueryParams(
747
+ request: CommonAuthorizationUrlRequest | CommonEndSessionRequest,
748
+ parameterBuilder: RequestParameterBuilder
749
+ ) {
750
+ const hasRequestInstanceAware =
751
+ request.extraQueryParameters &&
752
+ request.extraQueryParameters.hasOwnProperty("instance_aware");
753
+
754
+ // Set instance_aware flag if config auth param is set
755
+ if (!hasRequestInstanceAware && this.config.authOptions.instanceAware) {
756
+ request.extraQueryParameters = request.extraQueryParameters || {};
757
+ request.extraQueryParameters["instance_aware"] = "true";
758
+ }
759
+
745
760
  if (request.extraQueryParameters) {
746
761
  parameterBuilder.addExtraQueryParameters(
747
762
  request.extraQueryParameters
748
763
  );
749
764
  }
750
-
751
- return parameterBuilder.createQueryString();
752
765
  }
753
766
 
754
767
  /**
@@ -7,25 +7,25 @@ import {
7
7
  ClientConfiguration,
8
8
  buildClientConfiguration,
9
9
  CommonClientConfiguration,
10
- } from "../config/ClientConfiguration";
11
- import { INetworkModule } from "../network/INetworkModule";
12
- import { NetworkManager, NetworkResponse } from "../network/NetworkManager";
13
- import { ICrypto } from "../crypto/ICrypto";
14
- import { Authority } from "../authority/Authority";
15
- import { Logger } from "../logger/Logger";
16
- import { Constants, HeaderNames } from "../utils/Constants";
17
- import { ServerAuthorizationTokenResponse } from "../response/ServerAuthorizationTokenResponse";
18
- import { CacheManager } from "../cache/CacheManager";
19
- import { ServerTelemetryManager } from "../telemetry/server/ServerTelemetryManager";
20
- import { RequestThumbprint } from "../network/RequestThumbprint";
21
- import { version, name } from "../packageMetadata";
22
- import { CcsCredential, CcsCredentialType } from "../account/CcsCredential";
23
- import { buildClientInfoFromHomeAccountId } from "../account/ClientInfo";
24
- import { IPerformanceClient } from "../telemetry/performance/IPerformanceClient";
25
- import { RequestParameterBuilder } from "../request/RequestParameterBuilder";
26
- import { BaseAuthRequest } from "../request/BaseAuthRequest";
27
- import { createDiscoveredInstance } from "../authority/AuthorityFactory";
28
- import { PerformanceEvents } from "../telemetry/performance/PerformanceEvent";
10
+ } from "../config/ClientConfiguration.js";
11
+ import { INetworkModule } from "../network/INetworkModule.js";
12
+ import { NetworkManager, NetworkResponse } from "../network/NetworkManager.js";
13
+ import { ICrypto } from "../crypto/ICrypto.js";
14
+ import { Authority } from "../authority/Authority.js";
15
+ import { Logger } from "../logger/Logger.js";
16
+ import { Constants, HeaderNames } from "../utils/Constants.js";
17
+ import { ServerAuthorizationTokenResponse } from "../response/ServerAuthorizationTokenResponse.js";
18
+ import { CacheManager } from "../cache/CacheManager.js";
19
+ import { ServerTelemetryManager } from "../telemetry/server/ServerTelemetryManager.js";
20
+ import { RequestThumbprint } from "../network/RequestThumbprint.js";
21
+ import { version, name } from "../packageMetadata.js";
22
+ import { CcsCredential, CcsCredentialType } from "../account/CcsCredential.js";
23
+ import { buildClientInfoFromHomeAccountId } from "../account/ClientInfo.js";
24
+ import { IPerformanceClient } from "../telemetry/performance/IPerformanceClient.js";
25
+ import { RequestParameterBuilder } from "../request/RequestParameterBuilder.js";
26
+ import { BaseAuthRequest } from "../request/BaseAuthRequest.js";
27
+ import { createDiscoveredInstance } from "../authority/AuthorityFactory.js";
28
+ import { PerformanceEvents } from "../telemetry/performance/PerformanceEvent.js";
29
29
 
30
30
  /**
31
31
  * Base application class which will construct requests to send to and handle responses from the Microsoft STS using the authorization code flow.
@@ -6,50 +6,50 @@
6
6
  import {
7
7
  ClientConfiguration,
8
8
  isOidcProtocolMode,
9
- } from "../config/ClientConfiguration";
10
- import { BaseClient } from "./BaseClient";
11
- import { CommonRefreshTokenRequest } from "../request/CommonRefreshTokenRequest";
12
- import { Authority } from "../authority/Authority";
13
- import { ServerAuthorizationTokenResponse } from "../response/ServerAuthorizationTokenResponse";
14
- import { RequestParameterBuilder } from "../request/RequestParameterBuilder";
9
+ } from "../config/ClientConfiguration.js";
10
+ import { BaseClient } from "./BaseClient.js";
11
+ import { CommonRefreshTokenRequest } from "../request/CommonRefreshTokenRequest.js";
12
+ import { Authority } from "../authority/Authority.js";
13
+ import { ServerAuthorizationTokenResponse } from "../response/ServerAuthorizationTokenResponse.js";
14
+ import { RequestParameterBuilder } from "../request/RequestParameterBuilder.js";
15
15
  import {
16
16
  GrantType,
17
17
  AuthenticationScheme,
18
18
  Errors,
19
19
  HeaderNames,
20
- } from "../utils/Constants";
21
- import * as AADServerParamKeys from "../constants/AADServerParamKeys";
22
- import { ResponseHandler } from "../response/ResponseHandler";
23
- import { AuthenticationResult } from "../response/AuthenticationResult";
24
- import { PopTokenGenerator } from "../crypto/PopTokenGenerator";
25
- import { StringUtils } from "../utils/StringUtils";
26
- import { RequestThumbprint } from "../network/RequestThumbprint";
27
- import { NetworkResponse } from "../network/NetworkManager";
28
- import { CommonSilentFlowRequest } from "../request/CommonSilentFlowRequest";
20
+ } from "../utils/Constants.js";
21
+ import * as AADServerParamKeys from "../constants/AADServerParamKeys.js";
22
+ import { ResponseHandler } from "../response/ResponseHandler.js";
23
+ import { AuthenticationResult } from "../response/AuthenticationResult.js";
24
+ import { PopTokenGenerator } from "../crypto/PopTokenGenerator.js";
25
+ import { StringUtils } from "../utils/StringUtils.js";
26
+ import { RequestThumbprint } from "../network/RequestThumbprint.js";
27
+ import { NetworkResponse } from "../network/NetworkManager.js";
28
+ import { CommonSilentFlowRequest } from "../request/CommonSilentFlowRequest.js";
29
29
  import {
30
30
  createClientConfigurationError,
31
31
  ClientConfigurationErrorCodes,
32
- } from "../error/ClientConfigurationError";
32
+ } from "../error/ClientConfigurationError.js";
33
33
  import {
34
34
  createClientAuthError,
35
35
  ClientAuthErrorCodes,
36
- } from "../error/ClientAuthError";
37
- import { ServerError } from "../error/ServerError";
38
- import * as TimeUtils from "../utils/TimeUtils";
39
- import { UrlString } from "../url/UrlString";
40
- import { CcsCredentialType } from "../account/CcsCredential";
41
- import { buildClientInfoFromHomeAccountId } from "../account/ClientInfo";
36
+ } from "../error/ClientAuthError.js";
37
+ import { ServerError } from "../error/ServerError.js";
38
+ import * as TimeUtils from "../utils/TimeUtils.js";
39
+ import { UrlString } from "../url/UrlString.js";
40
+ import { CcsCredentialType } from "../account/CcsCredential.js";
41
+ import { buildClientInfoFromHomeAccountId } from "../account/ClientInfo.js";
42
42
  import {
43
43
  InteractionRequiredAuthError,
44
44
  InteractionRequiredAuthErrorCodes,
45
45
  createInteractionRequiredAuthError,
46
- } from "../error/InteractionRequiredAuthError";
47
- import { PerformanceEvents } from "../telemetry/performance/PerformanceEvent";
48
- import { IPerformanceClient } from "../telemetry/performance/IPerformanceClient";
49
- import { invoke, invokeAsync } from "../utils/FunctionWrappers";
50
- import { generateCredentialKey } from "../cache/utils/CacheHelpers";
51
- import { ClientAssertion } from "../account/ClientCredentials";
52
- import { getClientAssertion } from "../utils/ClientAssertionUtils";
46
+ } from "../error/InteractionRequiredAuthError.js";
47
+ import { PerformanceEvents } from "../telemetry/performance/PerformanceEvent.js";
48
+ import { IPerformanceClient } from "../telemetry/performance/IPerformanceClient.js";
49
+ import { invoke, invokeAsync } from "../utils/FunctionWrappers.js";
50
+ import { generateCredentialKey } from "../cache/utils/CacheHelpers.js";
51
+ import { ClientAssertion } from "../account/ClientCredentials.js";
52
+ import { getClientAssertion } from "../utils/ClientAssertionUtils.js";
53
53
 
54
54
  const DEFAULT_REFRESH_TOKEN_EXPIRATION_OFFSET_SECONDS = 300; // 5 Minutes
55
55
 
@@ -3,27 +3,27 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
- import { BaseClient } from "./BaseClient";
7
- import { ClientConfiguration } from "../config/ClientConfiguration";
8
- import { CommonSilentFlowRequest } from "../request/CommonSilentFlowRequest";
9
- import { AuthenticationResult } from "../response/AuthenticationResult";
10
- import * as TimeUtils from "../utils/TimeUtils";
11
- import { RefreshTokenClient } from "./RefreshTokenClient";
6
+ import { BaseClient } from "./BaseClient.js";
7
+ import { ClientConfiguration } from "../config/ClientConfiguration.js";
8
+ import { CommonSilentFlowRequest } from "../request/CommonSilentFlowRequest.js";
9
+ import { AuthenticationResult } from "../response/AuthenticationResult.js";
10
+ import * as TimeUtils from "../utils/TimeUtils.js";
11
+ import { RefreshTokenClient } from "./RefreshTokenClient.js";
12
12
  import {
13
13
  ClientAuthError,
14
14
  ClientAuthErrorCodes,
15
15
  createClientAuthError,
16
- } from "../error/ClientAuthError";
17
- import { ResponseHandler } from "../response/ResponseHandler";
18
- import { CacheRecord } from "../cache/entities/CacheRecord";
19
- import { CacheOutcome, OIDC_DEFAULT_SCOPES } from "../utils/Constants";
20
- import { IPerformanceClient } from "../telemetry/performance/IPerformanceClient";
21
- import { StringUtils } from "../utils/StringUtils";
22
- import { checkMaxAge, extractTokenClaims } from "../account/AuthToken";
23
- import { TokenClaims } from "../account/TokenClaims";
24
- import { PerformanceEvents } from "../telemetry/performance/PerformanceEvent";
25
- import { invokeAsync } from "../utils/FunctionWrappers";
26
- import { getTenantFromAuthorityString } from "../authority/Authority";
16
+ } from "../error/ClientAuthError.js";
17
+ import { ResponseHandler } from "../response/ResponseHandler.js";
18
+ import { CacheRecord } from "../cache/entities/CacheRecord.js";
19
+ import { CacheOutcome, OIDC_DEFAULT_SCOPES } from "../utils/Constants.js";
20
+ import { IPerformanceClient } from "../telemetry/performance/IPerformanceClient.js";
21
+ import { StringUtils } from "../utils/StringUtils.js";
22
+ import { checkMaxAge, extractTokenClaims } from "../account/AuthToken.js";
23
+ import { TokenClaims } from "../account/TokenClaims.js";
24
+ import { PerformanceEvents } from "../telemetry/performance/PerformanceEvent.js";
25
+ import { invokeAsync } from "../utils/FunctionWrappers.js";
26
+ import { getTenantFromAuthorityString } from "../authority/Authority.js";
27
27
 
28
28
  /** @internal */
29
29
  export class SilentFlowClient extends BaseClient {
@@ -3,26 +3,26 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
- import { INetworkModule } from "../network/INetworkModule";
7
- import { DEFAULT_CRYPTO_IMPLEMENTATION, ICrypto } from "../crypto/ICrypto";
8
- import { ILoggerCallback, Logger, LogLevel } from "../logger/Logger";
6
+ import { INetworkModule } from "../network/INetworkModule.js";
7
+ import { DEFAULT_CRYPTO_IMPLEMENTATION, ICrypto } from "../crypto/ICrypto.js";
8
+ import { ILoggerCallback, Logger, LogLevel } from "../logger/Logger.js";
9
9
  import {
10
10
  Constants,
11
11
  DEFAULT_TOKEN_RENEWAL_OFFSET_SEC,
12
- } from "../utils/Constants";
13
- import { version } from "../packageMetadata";
14
- import { Authority } from "../authority/Authority";
15
- import { AzureCloudInstance } from "../authority/AuthorityOptions";
16
- import { CacheManager, DefaultStorageClass } from "../cache/CacheManager";
17
- import { ServerTelemetryManager } from "../telemetry/server/ServerTelemetryManager";
18
- import { ICachePlugin } from "../cache/interface/ICachePlugin";
19
- import { ISerializableTokenCache } from "../cache/interface/ISerializableTokenCache";
20
- import { ClientCredentials } from "../account/ClientCredentials";
21
- import { ProtocolMode } from "../authority/ProtocolMode";
12
+ } from "../utils/Constants.js";
13
+ import { version } from "../packageMetadata.js";
14
+ import { Authority } from "../authority/Authority.js";
15
+ import { AzureCloudInstance } from "../authority/AuthorityOptions.js";
16
+ import { CacheManager, DefaultStorageClass } from "../cache/CacheManager.js";
17
+ import { ServerTelemetryManager } from "../telemetry/server/ServerTelemetryManager.js";
18
+ import { ICachePlugin } from "../cache/interface/ICachePlugin.js";
19
+ import { ISerializableTokenCache } from "../cache/interface/ISerializableTokenCache.js";
20
+ import { ClientCredentials } from "../account/ClientCredentials.js";
21
+ import { ProtocolMode } from "../authority/ProtocolMode.js";
22
22
  import {
23
23
  ClientAuthErrorCodes,
24
24
  createClientAuthError,
25
- } from "../error/ClientAuthError";
25
+ } from "../error/ClientAuthError.js";
26
26
 
27
27
  /**
28
28
  * Use the configuration object to configure MSAL Modules and initialize the base interfaces for MSAL.
@@ -80,7 +80,8 @@ export type CommonClientConfiguration = {
80
80
  * - cloudDiscoveryMetadata - A string containing the cloud discovery response. Used in AAD scenarios.
81
81
  * - clientCapabilities - Array of capabilities which will be added to the claims.access_token.xms_cc request property on every network request.
82
82
  * - protocolMode - Enum that represents the protocol that msal follows. Used for configuring proper endpoints.
83
- * - skipAuthorityMetadataCache - A flag to choose whether to use or not use the local metadata cache during authority initialization. Defaults to false.
83
+ * - skipAuthorityMetadataCache - A flag to choose whether to use or not use the local metadata cache during authority initialization. Defaults to false.
84
+ * - instanceAware - A flag of whether the STS will send back additional parameters to specify where the tokens should be retrieved from.
84
85
  * @internal
85
86
  */
86
87
  export type AuthOptions = {
@@ -89,6 +90,7 @@ export type AuthOptions = {
89
90
  clientCapabilities?: Array<string>;
90
91
  azureCloudOptions?: AzureCloudOptions;
91
92
  skipAuthorityMetadataCache?: boolean;
93
+ instanceAware?: boolean;
92
94
  };
93
95
 
94
96
  /**
@@ -271,6 +273,7 @@ function buildAuthOptions(authOptions: AuthOptions): Required<AuthOptions> {
271
273
  clientCapabilities: [],
272
274
  azureCloudOptions: DEFAULT_AZURE_CLOUD_OPTIONS,
273
275
  skipAuthorityMetadataCache: false,
276
+ instanceAware: false,
274
277
  ...authOptions,
275
278
  };
276
279
  }
@@ -6,9 +6,9 @@
6
6
  import {
7
7
  ClientAuthErrorCodes,
8
8
  createClientAuthError,
9
- } from "../error/ClientAuthError";
10
- import { BaseAuthRequest } from "../request/BaseAuthRequest";
11
- import { ShrOptions, SignedHttpRequest } from "./SignedHttpRequest";
9
+ } from "../error/ClientAuthError.js";
10
+ import { BaseAuthRequest } from "../request/BaseAuthRequest.js";
11
+ import { ShrOptions, SignedHttpRequest } from "./SignedHttpRequest.js";
12
12
 
13
13
  /**
14
14
  * The PkceCodes type describes the structure
@@ -6,8 +6,8 @@
6
6
  import {
7
7
  JoseHeaderErrorCodes,
8
8
  createJoseHeaderError,
9
- } from "../error/JoseHeaderError";
10
- import { JsonWebTokenTypes } from "../utils/Constants";
9
+ } from "../error/JoseHeaderError.js";
10
+ import { JsonWebTokenTypes } from "../utils/Constants.js";
11
11
 
12
12
  export type JoseHeaderOptions = {
13
13
  typ?: JsonWebTokenTypes;
@@ -3,13 +3,13 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
- import { ICrypto, SignedHttpRequestParameters } from "./ICrypto";
7
- import * as TimeUtils from "../utils/TimeUtils";
8
- import { UrlString } from "../url/UrlString";
9
- import { IPerformanceClient } from "../telemetry/performance/IPerformanceClient";
10
- import { PerformanceEvents } from "../telemetry/performance/PerformanceEvent";
11
- import { invokeAsync } from "../utils/FunctionWrappers";
12
- import { Logger } from "../logger/Logger";
6
+ import { ICrypto, SignedHttpRequestParameters } from "./ICrypto.js";
7
+ import * as TimeUtils from "../utils/TimeUtils.js";
8
+ import { UrlString } from "../url/UrlString.js";
9
+ import { IPerformanceClient } from "../telemetry/performance/IPerformanceClient.js";
10
+ import { PerformanceEvents } from "../telemetry/performance/PerformanceEvent.js";
11
+ import { invokeAsync } from "../utils/FunctionWrappers.js";
12
+ import { Logger } from "../logger/Logger.js";
13
13
 
14
14
  /**
15
15
  * See eSTS docs for more info.
@@ -3,7 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
- import { JoseHeaderOptions } from "./JoseHeader";
6
+ import { JoseHeaderOptions } from "./JoseHeader.js";
7
7
 
8
8
  export type SignedHttpRequest = {
9
9
  at?: string;
@@ -3,8 +3,8 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
- import { Constants } from "../utils/Constants";
7
- import * as AuthErrorCodes from "./AuthErrorCodes";
6
+ import { Constants } from "../utils/Constants.js";
7
+ import * as AuthErrorCodes from "./AuthErrorCodes.js";
8
8
  export { AuthErrorCodes };
9
9
 
10
10
  export const AuthErrorMessages = {
@@ -3,7 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
- import * as CacheErrorCodes from "./CacheErrorCodes";
6
+ import * as CacheErrorCodes from "./CacheErrorCodes.js";
7
7
  export { CacheErrorCodes };
8
8
 
9
9
  export const CacheErrorMessages = {
@@ -3,8 +3,8 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
- import { AuthError } from "./AuthError";
7
- import * as ClientAuthErrorCodes from "./ClientAuthErrorCodes";
6
+ import { AuthError } from "./AuthError.js";
7
+ import * as ClientAuthErrorCodes from "./ClientAuthErrorCodes.js";
8
8
  export { ClientAuthErrorCodes }; // Allow importing as "ClientAuthErrorCodes";
9
9
 
10
10
  /**
@@ -3,8 +3,8 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
- import { AuthError } from "./AuthError";
7
- import * as ClientConfigurationErrorCodes from "./ClientConfigurationErrorCodes";
6
+ import { AuthError } from "./AuthError.js";
7
+ import * as ClientConfigurationErrorCodes from "./ClientConfigurationErrorCodes.js";
8
8
  export { ClientConfigurationErrorCodes };
9
9
 
10
10
  export const ClientConfigurationErrorMessages = {
@@ -3,9 +3,9 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
- import { Constants } from "../utils/Constants";
7
- import { AuthError } from "./AuthError";
8
- import * as InteractionRequiredAuthErrorCodes from "./InteractionRequiredAuthErrorCodes";
6
+ import { Constants } from "../utils/Constants.js";
7
+ import { AuthError } from "./AuthError.js";
8
+ import * as InteractionRequiredAuthErrorCodes from "./InteractionRequiredAuthErrorCodes.js";
9
9
  export { InteractionRequiredAuthErrorCodes };
10
10
 
11
11
  /**
@@ -3,8 +3,8 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
- import { AuthError } from "./AuthError";
7
- import * as JoseHeaderErrorCodes from "./JoseHeaderErrorCodes";
6
+ import { AuthError } from "./AuthError.js";
7
+ import * as JoseHeaderErrorCodes from "./JoseHeaderErrorCodes.js";
8
8
  export { JoseHeaderErrorCodes };
9
9
 
10
10
  export const JoseHeaderErrorMessages = {
@@ -3,7 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
- import { AuthError } from "./AuthError";
6
+ import { AuthError } from "./AuthError.js";
7
7
 
8
8
  /**
9
9
  * Error thrown when there is an error with the server code, for example, unavailability.
@@ -0,0 +1,29 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ export { SignedHttpRequest, ShrOptions } from "./crypto/SignedHttpRequest.js";
7
+ export { JoseHeader } from "./crypto/JoseHeader.js";
8
+ export { ExternalTokenResponse } from "./response/ExternalTokenResponse.js";
9
+ export {
10
+ IPerformanceClient,
11
+ PerformanceCallbackFunction,
12
+ InProgressPerformanceEvent,
13
+ QueueMeasurement,
14
+ } from "./telemetry/performance/IPerformanceClient.js";
15
+ export {
16
+ IntFields,
17
+ PerformanceEvent,
18
+ PerformanceEvents,
19
+ PerformanceEventStatus,
20
+ SubMeasurement,
21
+ } from "./telemetry/performance/PerformanceEvent.js";
22
+ export { IPerformanceMeasurement } from "./telemetry/performance/IPerformanceMeasurement.js";
23
+ export {
24
+ PerformanceClient,
25
+ PreQueueEvent,
26
+ } from "./telemetry/performance/PerformanceClient.js";
27
+ export { StubPerformanceClient } from "./telemetry/performance/StubPerformanceClient.js";
28
+
29
+ export { PopTokenGenerator } from "./crypto/PopTokenGenerator.js";