@azure/msal-common 14.14.2 → 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 (558) 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.mjs +1 -1
  202. package/dist/telemetry/performance/StubPerformanceClient.d.ts +3 -3
  203. package/dist/telemetry/performance/StubPerformanceClient.d.ts.map +1 -1
  204. package/dist/telemetry/performance/StubPerformanceClient.mjs +1 -1
  205. package/dist/telemetry/performance/StubPerformanceClient.mjs.map +1 -1
  206. package/dist/telemetry/server/ServerTelemetryManager.d.ts +5 -5
  207. package/dist/telemetry/server/ServerTelemetryManager.d.ts.map +1 -1
  208. package/dist/telemetry/server/ServerTelemetryManager.mjs +1 -1
  209. package/dist/url/UrlString.d.ts +1 -1
  210. package/dist/url/UrlString.d.ts.map +1 -1
  211. package/dist/url/UrlString.mjs +1 -1
  212. package/dist/utils/ClientAssertionUtils.d.ts +1 -1
  213. package/dist/utils/ClientAssertionUtils.d.ts.map +1 -1
  214. package/dist/utils/ClientAssertionUtils.mjs +1 -1
  215. package/dist/utils/Constants.mjs +1 -1
  216. package/dist/utils/FunctionWrappers.d.ts +2 -2
  217. package/dist/utils/FunctionWrappers.d.ts.map +1 -1
  218. package/dist/utils/FunctionWrappers.mjs +1 -1
  219. package/dist/utils/ProtocolUtils.d.ts +1 -1
  220. package/dist/utils/ProtocolUtils.d.ts.map +1 -1
  221. package/dist/utils/ProtocolUtils.mjs +1 -1
  222. package/dist/utils/StringUtils.mjs +1 -1
  223. package/dist/utils/TimeUtils.mjs +1 -1
  224. package/dist/utils/UrlUtils.d.ts +1 -1
  225. package/dist/utils/UrlUtils.d.ts.map +1 -1
  226. package/dist/utils/UrlUtils.mjs +1 -1
  227. package/lib/index-browser.cjs +838 -0
  228. package/lib/index-browser.cjs.map +1 -0
  229. package/{dist/index.cjs → lib/index-node-aee3f7b6.js} +39 -765
  230. package/lib/index-node-aee3f7b6.js.map +1 -0
  231. package/lib/index-node.cjs +103 -0
  232. package/lib/index-node.cjs.map +1 -0
  233. package/lib/index.cjs +111 -0
  234. package/lib/index.cjs.map +1 -0
  235. package/lib/package.json +1 -0
  236. package/lib/types/account/AccountInfo.d.ts +67 -0
  237. package/lib/types/account/AccountInfo.d.ts.map +1 -0
  238. package/lib/types/account/AuthToken.d.ts +18 -0
  239. package/lib/types/account/AuthToken.d.ts.map +1 -0
  240. package/lib/types/account/CcsCredential.d.ts +10 -0
  241. package/lib/types/account/CcsCredential.d.ts.map +1 -0
  242. package/lib/types/account/ClientCredentials.d.ts +20 -0
  243. package/lib/types/account/ClientCredentials.d.ts.map +1 -0
  244. package/lib/types/account/ClientInfo.d.ts +19 -0
  245. package/lib/types/account/ClientInfo.d.ts.map +1 -0
  246. package/lib/types/account/TokenClaims.d.ts +84 -0
  247. package/lib/types/account/TokenClaims.d.ts.map +1 -0
  248. package/lib/types/authority/Authority.d.ts +255 -0
  249. package/lib/types/authority/Authority.d.ts.map +1 -0
  250. package/lib/types/authority/AuthorityFactory.d.ts +19 -0
  251. package/lib/types/authority/AuthorityFactory.d.ts.map +1 -0
  252. package/lib/types/authority/AuthorityMetadata.d.ts +44 -0
  253. package/lib/types/authority/AuthorityMetadata.d.ts.map +1 -0
  254. package/lib/types/authority/AuthorityOptions.d.ts +28 -0
  255. package/lib/types/authority/AuthorityOptions.d.ts.map +1 -0
  256. package/lib/types/authority/AuthorityType.d.ts +11 -0
  257. package/lib/types/authority/AuthorityType.d.ts.map +1 -0
  258. package/lib/types/authority/AzureRegion.d.ts +2 -0
  259. package/lib/types/authority/AzureRegion.d.ts.map +1 -0
  260. package/lib/types/authority/AzureRegionConfiguration.d.ts +6 -0
  261. package/lib/types/authority/AzureRegionConfiguration.d.ts.map +1 -0
  262. package/lib/types/authority/CloudDiscoveryMetadata.d.ts +6 -0
  263. package/lib/types/authority/CloudDiscoveryMetadata.d.ts.map +1 -0
  264. package/lib/types/authority/CloudInstanceDiscoveryErrorResponse.d.ts +14 -0
  265. package/lib/types/authority/CloudInstanceDiscoveryErrorResponse.d.ts.map +1 -0
  266. package/lib/types/authority/CloudInstanceDiscoveryResponse.d.ts +10 -0
  267. package/lib/types/authority/CloudInstanceDiscoveryResponse.d.ts.map +1 -0
  268. package/lib/types/authority/ImdsOptions.d.ts +6 -0
  269. package/lib/types/authority/ImdsOptions.d.ts.map +1 -0
  270. package/lib/types/authority/OIDCOptions.d.ts +9 -0
  271. package/lib/types/authority/OIDCOptions.d.ts.map +1 -0
  272. package/lib/types/authority/OpenIdConfigResponse.d.ts +12 -0
  273. package/lib/types/authority/OpenIdConfigResponse.d.ts.map +1 -0
  274. package/lib/types/authority/ProtocolMode.d.ts +9 -0
  275. package/lib/types/authority/ProtocolMode.d.ts.map +1 -0
  276. package/lib/types/authority/RegionDiscovery.d.ts +33 -0
  277. package/lib/types/authority/RegionDiscovery.d.ts.map +1 -0
  278. package/lib/types/authority/RegionDiscoveryMetadata.d.ts +7 -0
  279. package/lib/types/authority/RegionDiscoveryMetadata.d.ts.map +1 -0
  280. package/lib/types/broker/nativeBroker/INativeBrokerPlugin.d.ts +16 -0
  281. package/lib/types/broker/nativeBroker/INativeBrokerPlugin.d.ts.map +1 -0
  282. package/lib/types/cache/CacheManager.d.ts +498 -0
  283. package/lib/types/cache/CacheManager.d.ts.map +1 -0
  284. package/lib/types/cache/entities/AccessTokenEntity.d.ts +26 -0
  285. package/lib/types/cache/entities/AccessTokenEntity.d.ts.map +1 -0
  286. package/lib/types/cache/entities/AccountEntity.d.ts +107 -0
  287. package/lib/types/cache/entities/AccountEntity.d.ts.map +1 -0
  288. package/lib/types/cache/entities/AppMetadataEntity.d.ts +12 -0
  289. package/lib/types/cache/entities/AppMetadataEntity.d.ts.map +1 -0
  290. package/lib/types/cache/entities/AuthorityMetadataEntity.d.ts +16 -0
  291. package/lib/types/cache/entities/AuthorityMetadataEntity.d.ts.map +1 -0
  292. package/lib/types/cache/entities/CacheRecord.d.ts +14 -0
  293. package/lib/types/cache/entities/CacheRecord.d.ts.map +1 -0
  294. package/lib/types/cache/entities/CredentialEntity.d.ts +31 -0
  295. package/lib/types/cache/entities/CredentialEntity.d.ts.map +1 -0
  296. package/lib/types/cache/entities/IdTokenEntity.d.ts +9 -0
  297. package/lib/types/cache/entities/IdTokenEntity.d.ts.map +1 -0
  298. package/lib/types/cache/entities/RefreshTokenEntity.d.ts +8 -0
  299. package/lib/types/cache/entities/RefreshTokenEntity.d.ts.map +1 -0
  300. package/lib/types/cache/entities/ServerTelemetryEntity.d.ts +7 -0
  301. package/lib/types/cache/entities/ServerTelemetryEntity.d.ts.map +1 -0
  302. package/lib/types/cache/entities/ThrottlingEntity.d.ts +8 -0
  303. package/lib/types/cache/entities/ThrottlingEntity.d.ts.map +1 -0
  304. package/lib/types/cache/interface/ICacheManager.d.ts +167 -0
  305. package/lib/types/cache/interface/ICacheManager.d.ts.map +1 -0
  306. package/lib/types/cache/interface/ICachePlugin.d.ts +6 -0
  307. package/lib/types/cache/interface/ICachePlugin.d.ts.map +1 -0
  308. package/lib/types/cache/interface/ISerializableTokenCache.d.ts +5 -0
  309. package/lib/types/cache/interface/ISerializableTokenCache.d.ts.map +1 -0
  310. package/lib/types/cache/persistence/TokenCacheContext.d.ts +24 -0
  311. package/lib/types/cache/persistence/TokenCacheContext.d.ts.map +1 -0
  312. package/lib/types/cache/utils/CacheHelpers.d.ts +95 -0
  313. package/lib/types/cache/utils/CacheHelpers.d.ts.map +1 -0
  314. package/lib/types/cache/utils/CacheTypes.d.ts +70 -0
  315. package/lib/types/cache/utils/CacheTypes.d.ts.map +1 -0
  316. package/lib/types/client/AuthorizationCodeClient.d.ts +76 -0
  317. package/lib/types/client/AuthorizationCodeClient.d.ts.map +1 -0
  318. package/lib/types/client/BaseClient.d.ts +52 -0
  319. package/lib/types/client/BaseClient.d.ts.map +1 -0
  320. package/lib/types/client/RefreshTokenClient.d.ts +36 -0
  321. package/lib/types/client/RefreshTokenClient.d.ts.map +1 -0
  322. package/lib/types/client/SilentFlowClient.d.ts +28 -0
  323. package/lib/types/client/SilentFlowClient.d.ts.map +1 -0
  324. package/lib/types/config/AppTokenProvider.d.ts +39 -0
  325. package/lib/types/config/AppTokenProvider.d.ts.map +1 -0
  326. package/lib/types/config/ClientConfiguration.d.ts +153 -0
  327. package/lib/types/config/ClientConfiguration.d.ts.map +1 -0
  328. package/lib/types/constants/AADServerParamKeys.d.ts +54 -0
  329. package/lib/types/constants/AADServerParamKeys.d.ts.map +1 -0
  330. package/lib/types/crypto/ICrypto.d.ts +69 -0
  331. package/lib/types/crypto/ICrypto.d.ts.map +1 -0
  332. package/lib/types/crypto/IGuidGenerator.d.ts +5 -0
  333. package/lib/types/crypto/IGuidGenerator.d.ts.map +1 -0
  334. package/lib/types/crypto/JoseHeader.d.ts +23 -0
  335. package/lib/types/crypto/JoseHeader.d.ts.map +1 -0
  336. package/lib/types/crypto/PopTokenGenerator.d.ts +60 -0
  337. package/lib/types/crypto/PopTokenGenerator.d.ts.map +1 -0
  338. package/lib/types/crypto/SignedHttpRequest.d.ts +16 -0
  339. package/lib/types/crypto/SignedHttpRequest.d.ts.map +1 -0
  340. package/lib/types/error/AuthError.d.ts +45 -0
  341. package/lib/types/error/AuthError.d.ts.map +1 -0
  342. package/lib/types/error/AuthErrorCodes.d.ts +6 -0
  343. package/lib/types/error/AuthErrorCodes.d.ts.map +1 -0
  344. package/lib/types/error/CacheError.d.ts +21 -0
  345. package/lib/types/error/CacheError.d.ts.map +1 -0
  346. package/lib/types/error/CacheErrorCodes.d.ts +3 -0
  347. package/lib/types/error/CacheErrorCodes.d.ts.map +1 -0
  348. package/lib/types/error/ClientAuthError.d.ts +238 -0
  349. package/lib/types/error/ClientAuthError.d.ts.map +1 -0
  350. package/lib/types/error/ClientAuthErrorCodes.d.ts +45 -0
  351. package/lib/types/error/ClientAuthErrorCodes.d.ts.map +1 -0
  352. package/lib/types/error/ClientConfigurationError.d.ts +129 -0
  353. package/lib/types/error/ClientConfigurationError.d.ts.map +1 -0
  354. package/lib/types/error/ClientConfigurationErrorCodes.d.ts +23 -0
  355. package/lib/types/error/ClientConfigurationErrorCodes.d.ts.map +1 -0
  356. package/lib/types/error/InteractionRequiredAuthError.d.ts +66 -0
  357. package/lib/types/error/InteractionRequiredAuthError.d.ts.map +1 -0
  358. package/lib/types/error/InteractionRequiredAuthErrorCodes.d.ts +8 -0
  359. package/lib/types/error/InteractionRequiredAuthErrorCodes.d.ts.map +1 -0
  360. package/lib/types/error/JoseHeaderError.d.ts +16 -0
  361. package/lib/types/error/JoseHeaderError.d.ts.map +1 -0
  362. package/lib/types/error/JoseHeaderErrorCodes.d.ts +3 -0
  363. package/lib/types/error/JoseHeaderErrorCodes.d.ts.map +1 -0
  364. package/lib/types/error/ServerError.d.ts +16 -0
  365. package/lib/types/error/ServerError.d.ts.map +1 -0
  366. package/lib/types/exports-browser-only.d.ts +10 -0
  367. package/lib/types/exports-browser-only.d.ts.map +1 -0
  368. package/lib/types/exports-common.d.ts +80 -0
  369. package/lib/types/exports-common.d.ts.map +1 -0
  370. package/lib/types/exports-node-only.d.ts +18 -0
  371. package/lib/types/exports-node-only.d.ts.map +1 -0
  372. package/lib/types/index-browser.d.ts +7 -0
  373. package/lib/types/index-browser.d.ts.map +1 -0
  374. package/lib/types/index-node.d.ts +7 -0
  375. package/lib/types/index-node.d.ts.map +1 -0
  376. package/lib/types/index.d.ts +12 -0
  377. package/lib/types/index.d.ts.map +1 -0
  378. package/lib/types/logger/Logger.d.ts +96 -0
  379. package/lib/types/logger/Logger.d.ts.map +1 -0
  380. package/lib/types/network/INetworkModule.d.ts +30 -0
  381. package/lib/types/network/INetworkModule.d.ts.map +1 -0
  382. package/lib/types/network/NetworkManager.d.ts +34 -0
  383. package/lib/types/network/NetworkManager.d.ts.map +1 -0
  384. package/lib/types/network/RequestThumbprint.d.ts +19 -0
  385. package/lib/types/network/RequestThumbprint.d.ts.map +1 -0
  386. package/lib/types/network/ThrottlingUtils.d.ts +43 -0
  387. package/lib/types/network/ThrottlingUtils.d.ts.map +1 -0
  388. package/lib/types/packageMetadata.d.ts +3 -0
  389. package/lib/types/packageMetadata.d.ts.map +1 -0
  390. package/lib/types/request/AuthenticationHeaderParser.d.ts +20 -0
  391. package/lib/types/request/AuthenticationHeaderParser.d.ts.map +1 -0
  392. package/lib/types/request/BaseAuthRequest.d.ts +48 -0
  393. package/lib/types/request/BaseAuthRequest.d.ts.map +1 -0
  394. package/lib/types/request/CommonAuthorizationCodeRequest.d.ts +28 -0
  395. package/lib/types/request/CommonAuthorizationCodeRequest.d.ts.map +1 -0
  396. package/lib/types/request/CommonAuthorizationUrlRequest.d.ts +51 -0
  397. package/lib/types/request/CommonAuthorizationUrlRequest.d.ts.map +1 -0
  398. package/lib/types/request/CommonClientCredentialRequest.d.ts +18 -0
  399. package/lib/types/request/CommonClientCredentialRequest.d.ts.map +1 -0
  400. package/lib/types/request/CommonDeviceCodeRequest.d.ts +22 -0
  401. package/lib/types/request/CommonDeviceCodeRequest.d.ts.map +1 -0
  402. package/lib/types/request/CommonEndSessionRequest.d.ts +22 -0
  403. package/lib/types/request/CommonEndSessionRequest.d.ts.map +1 -0
  404. package/lib/types/request/CommonOnBehalfOfRequest.d.ts +14 -0
  405. package/lib/types/request/CommonOnBehalfOfRequest.d.ts.map +1 -0
  406. package/lib/types/request/CommonRefreshTokenRequest.d.ts +23 -0
  407. package/lib/types/request/CommonRefreshTokenRequest.d.ts.map +1 -0
  408. package/lib/types/request/CommonSilentFlowRequest.d.ts +28 -0
  409. package/lib/types/request/CommonSilentFlowRequest.d.ts.map +1 -0
  410. package/lib/types/request/CommonUsernamePasswordRequest.d.ts +18 -0
  411. package/lib/types/request/CommonUsernamePasswordRequest.d.ts.map +1 -0
  412. package/lib/types/request/NativeRequest.d.ts +20 -0
  413. package/lib/types/request/NativeRequest.d.ts.map +1 -0
  414. package/lib/types/request/NativeSignOutRequest.d.ts +6 -0
  415. package/lib/types/request/NativeSignOutRequest.d.ts.map +1 -0
  416. package/lib/types/request/RequestParameterBuilder.d.ts +218 -0
  417. package/lib/types/request/RequestParameterBuilder.d.ts.map +1 -0
  418. package/lib/types/request/RequestValidator.d.ts +28 -0
  419. package/lib/types/request/RequestValidator.d.ts.map +1 -0
  420. package/lib/types/request/ScopeSet.d.ts +89 -0
  421. package/lib/types/request/ScopeSet.d.ts.map +1 -0
  422. package/lib/types/request/StoreInCache.d.ts +9 -0
  423. package/lib/types/request/StoreInCache.d.ts.map +1 -0
  424. package/lib/types/response/AuthenticationResult.d.ts +42 -0
  425. package/lib/types/response/AuthenticationResult.d.ts.map +1 -0
  426. package/lib/types/response/AuthorizationCodePayload.d.ts +14 -0
  427. package/lib/types/response/AuthorizationCodePayload.d.ts.map +1 -0
  428. package/lib/types/response/DeviceCodeResponse.d.ts +26 -0
  429. package/lib/types/response/DeviceCodeResponse.d.ts.map +1 -0
  430. package/lib/types/response/ExternalTokenResponse.d.ts +16 -0
  431. package/lib/types/response/ExternalTokenResponse.d.ts.map +1 -0
  432. package/lib/types/response/IMDSBadResponse.d.ts +5 -0
  433. package/lib/types/response/IMDSBadResponse.d.ts.map +1 -0
  434. package/lib/types/response/ResponseHandler.d.ts +70 -0
  435. package/lib/types/response/ResponseHandler.d.ts.map +1 -0
  436. package/lib/types/response/ServerAuthorizationCodeResponse.d.ts +27 -0
  437. package/lib/types/response/ServerAuthorizationCodeResponse.d.ts.map +1 -0
  438. package/lib/types/response/ServerAuthorizationTokenResponse.d.ts +48 -0
  439. package/lib/types/response/ServerAuthorizationTokenResponse.d.ts.map +1 -0
  440. package/lib/types/telemetry/performance/IPerformanceClient.d.ts +58 -0
  441. package/lib/types/telemetry/performance/IPerformanceClient.d.ts.map +1 -0
  442. package/lib/types/telemetry/performance/IPerformanceMeasurement.d.ts +6 -0
  443. package/lib/types/telemetry/performance/IPerformanceMeasurement.d.ts.map +1 -0
  444. package/lib/types/telemetry/performance/PerformanceClient.d.ts +243 -0
  445. package/lib/types/telemetry/performance/PerformanceClient.d.ts.map +1 -0
  446. package/lib/types/telemetry/performance/PerformanceEvent.d.ts +512 -0
  447. package/lib/types/telemetry/performance/PerformanceEvent.d.ts.map +1 -0
  448. package/lib/types/telemetry/performance/StubPerformanceClient.d.ts +25 -0
  449. package/lib/types/telemetry/performance/StubPerformanceClient.d.ts.map +1 -0
  450. package/lib/types/telemetry/server/ServerTelemetryManager.d.ts +79 -0
  451. package/lib/types/telemetry/server/ServerTelemetryManager.d.ts.map +1 -0
  452. package/lib/types/telemetry/server/ServerTelemetryRequest.d.ts +9 -0
  453. package/lib/types/telemetry/server/ServerTelemetryRequest.d.ts.map +1 -0
  454. package/lib/types/url/IUri.d.ts +13 -0
  455. package/lib/types/url/IUri.d.ts.map +1 -0
  456. package/lib/types/url/UrlString.d.ts +49 -0
  457. package/lib/types/url/UrlString.d.ts.map +1 -0
  458. package/lib/types/utils/ClientAssertionUtils.d.ts +3 -0
  459. package/lib/types/utils/ClientAssertionUtils.d.ts.map +1 -0
  460. package/lib/types/utils/Constants.d.ts +310 -0
  461. package/lib/types/utils/Constants.d.ts.map +1 -0
  462. package/lib/types/utils/FunctionWrappers.d.ts +28 -0
  463. package/lib/types/utils/FunctionWrappers.d.ts.map +1 -0
  464. package/lib/types/utils/MsalTypes.d.ts +7 -0
  465. package/lib/types/utils/MsalTypes.d.ts.map +1 -0
  466. package/lib/types/utils/ProtocolUtils.d.ts +43 -0
  467. package/lib/types/utils/ProtocolUtils.d.ts.map +1 -0
  468. package/lib/types/utils/StringUtils.d.ts +41 -0
  469. package/lib/types/utils/StringUtils.d.ts.map +1 -0
  470. package/lib/types/utils/TimeUtils.d.ts +26 -0
  471. package/lib/types/utils/TimeUtils.d.ts.map +1 -0
  472. package/lib/types/utils/UrlUtils.d.ts +11 -0
  473. package/lib/types/utils/UrlUtils.d.ts.map +1 -0
  474. package/node/README.md +1 -0
  475. package/node/package.json +5 -0
  476. package/package.json +37 -8
  477. package/src/account/AccountInfo.ts +1 -1
  478. package/src/account/AuthToken.ts +2 -2
  479. package/src/account/ClientInfo.ts +2 -2
  480. package/src/authority/Authority.ts +26 -26
  481. package/src/authority/AuthorityFactory.ts +9 -9
  482. package/src/authority/AuthorityMetadata.ts +7 -7
  483. package/src/authority/AuthorityOptions.ts +4 -4
  484. package/src/authority/AzureRegionConfiguration.ts +1 -1
  485. package/src/authority/CloudInstanceDiscoveryResponse.ts +1 -1
  486. package/src/authority/OIDCOptions.ts +1 -1
  487. package/src/authority/RegionDiscovery.ts +10 -10
  488. package/src/authority/RegionDiscoveryMetadata.ts +1 -1
  489. package/src/broker/nativeBroker/INativeBrokerPlugin.ts +5 -5
  490. package/src/cache/CacheManager.ts +28 -28
  491. package/src/cache/entities/AccessTokenEntity.ts +2 -2
  492. package/src/cache/entities/AccountEntity.ts +10 -10
  493. package/src/cache/entities/CacheRecord.ts +5 -5
  494. package/src/cache/entities/CredentialEntity.ts +1 -1
  495. package/src/cache/entities/IdTokenEntity.ts +1 -1
  496. package/src/cache/entities/RefreshTokenEntity.ts +1 -1
  497. package/src/cache/interface/ICacheManager.ts +12 -12
  498. package/src/cache/interface/ICachePlugin.ts +1 -1
  499. package/src/cache/persistence/TokenCacheContext.ts +1 -1
  500. package/src/cache/utils/CacheHelpers.ts +13 -13
  501. package/src/cache/utils/CacheTypes.ts +11 -11
  502. package/src/client/AuthorizationCodeClient.ts +51 -38
  503. package/src/client/BaseClient.ts +19 -19
  504. package/src/client/RefreshTokenClient.ts +29 -29
  505. package/src/client/SilentFlowClient.ts +17 -17
  506. package/src/config/ClientConfiguration.ts +18 -15
  507. package/src/crypto/ICrypto.ts +3 -3
  508. package/src/crypto/JoseHeader.ts +2 -2
  509. package/src/crypto/PopTokenGenerator.ts +7 -7
  510. package/src/crypto/SignedHttpRequest.ts +1 -1
  511. package/src/error/AuthError.ts +2 -2
  512. package/src/error/CacheError.ts +1 -1
  513. package/src/error/ClientAuthError.ts +2 -2
  514. package/src/error/ClientConfigurationError.ts +2 -2
  515. package/src/error/InteractionRequiredAuthError.ts +3 -3
  516. package/src/error/JoseHeaderError.ts +2 -2
  517. package/src/error/ServerError.ts +1 -1
  518. package/src/exports-browser-only.ts +29 -0
  519. package/src/exports-common.ts +192 -0
  520. package/src/exports-node-only.ts +35 -0
  521. package/src/index-browser.ts +11 -0
  522. package/src/index-node.ts +11 -0
  523. package/src/index.ts +7 -250
  524. package/src/logger/Logger.ts +2 -2
  525. package/src/network/INetworkModule.ts +2 -2
  526. package/src/network/NetworkManager.ts +7 -7
  527. package/src/network/RequestThumbprint.ts +2 -2
  528. package/src/network/ThrottlingUtils.ts +8 -8
  529. package/src/packageMetadata.ts +1 -1
  530. package/src/request/AuthenticationHeaderParser.ts +2 -2
  531. package/src/request/BaseAuthRequest.ts +5 -5
  532. package/src/request/CommonAuthorizationCodeRequest.ts +3 -3
  533. package/src/request/CommonAuthorizationUrlRequest.ts +4 -4
  534. package/src/request/CommonClientCredentialRequest.ts +3 -3
  535. package/src/request/CommonDeviceCodeRequest.ts +3 -3
  536. package/src/request/CommonEndSessionRequest.ts +2 -2
  537. package/src/request/CommonOnBehalfOfRequest.ts +1 -1
  538. package/src/request/CommonRefreshTokenRequest.ts +3 -3
  539. package/src/request/CommonSilentFlowRequest.ts +3 -3
  540. package/src/request/CommonUsernamePasswordRequest.ts +1 -1
  541. package/src/request/NativeRequest.ts +1 -1
  542. package/src/request/RequestParameterBuilder.ts +9 -9
  543. package/src/request/RequestValidator.ts +2 -2
  544. package/src/request/ScopeSet.ts +4 -4
  545. package/src/response/AuthenticationResult.ts +1 -1
  546. package/src/response/ExternalTokenResponse.ts +1 -1
  547. package/src/response/ResponseHandler.ts +31 -31
  548. package/src/response/ServerAuthorizationTokenResponse.ts +1 -1
  549. package/src/telemetry/performance/IPerformanceClient.ts +2 -2
  550. package/src/telemetry/performance/PerformanceClient.ts +10 -10
  551. package/src/telemetry/performance/StubPerformanceClient.ts +6 -3
  552. package/src/telemetry/server/ServerTelemetryManager.ts +6 -6
  553. package/src/url/UrlString.ts +5 -5
  554. package/src/utils/ClientAssertionUtils.ts +1 -1
  555. package/src/utils/FunctionWrappers.ts +2 -2
  556. package/src/utils/ProtocolUtils.ts +3 -3
  557. package/src/utils/UrlUtils.ts +2 -2
  558. package/dist/index.cjs.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-node.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/lib/index.cjs ADDED
@@ -0,0 +1,111 @@
1
+ /*! @azure/msal-common v14.15.0 2024-09-20 */
2
+ 'use strict';
3
+ 'use strict';
4
+
5
+ var indexNode = require('./index-node-aee3f7b6.js');
6
+ var indexBrowser = require('./index-browser.cjs');
7
+
8
+
9
+
10
+ exports.AADAuthorityConstants = indexNode.AADAuthorityConstants;
11
+ exports.AADServerParamKeys = indexNode.AADServerParamKeys;
12
+ exports.AccountEntity = indexNode.AccountEntity;
13
+ exports.AuthError = indexNode.AuthError;
14
+ exports.AuthErrorCodes = indexNode.AuthErrorCodes;
15
+ exports.AuthErrorMessage = indexNode.AuthErrorMessage;
16
+ exports.AuthToken = indexNode.AuthToken;
17
+ exports.AuthenticationHeaderParser = indexNode.AuthenticationHeaderParser;
18
+ exports.AuthenticationScheme = indexNode.AuthenticationScheme;
19
+ exports.Authority = indexNode.Authority;
20
+ exports.AuthorityFactory = indexNode.AuthorityFactory;
21
+ exports.AuthorityType = indexNode.AuthorityType;
22
+ exports.AuthorizationCodeClient = indexNode.AuthorizationCodeClient;
23
+ exports.AzureCloudInstance = indexNode.AzureCloudInstance;
24
+ exports.BaseClient = indexNode.BaseClient;
25
+ exports.CacheAccountType = indexNode.CacheAccountType;
26
+ exports.CacheError = indexNode.CacheError;
27
+ exports.CacheErrorCodes = indexNode.CacheErrorCodes;
28
+ exports.CacheHelpers = indexNode.CacheHelpers;
29
+ exports.CacheManager = indexNode.CacheManager;
30
+ exports.CacheOutcome = indexNode.CacheOutcome;
31
+ exports.CacheType = indexNode.CacheType;
32
+ exports.CcsCredentialType = indexNode.CcsCredentialType;
33
+ exports.ClaimsRequestKeys = indexNode.ClaimsRequestKeys;
34
+ exports.ClientAssertionUtils = indexNode.ClientAssertionUtils;
35
+ exports.ClientAuthError = indexNode.ClientAuthError;
36
+ exports.ClientAuthErrorCodes = indexNode.ClientAuthErrorCodes;
37
+ exports.ClientAuthErrorMessage = indexNode.ClientAuthErrorMessage;
38
+ exports.ClientConfigurationError = indexNode.ClientConfigurationError;
39
+ exports.ClientConfigurationErrorCodes = indexNode.ClientConfigurationErrorCodes;
40
+ exports.ClientConfigurationErrorMessage = indexNode.ClientConfigurationErrorMessage;
41
+ exports.CodeChallengeMethodValues = indexNode.CodeChallengeMethodValues;
42
+ exports.Constants = indexNode.Constants;
43
+ exports.CredentialType = indexNode.CredentialType;
44
+ exports.DEFAULT_CRYPTO_IMPLEMENTATION = indexNode.DEFAULT_CRYPTO_IMPLEMENTATION;
45
+ exports.DEFAULT_SYSTEM_OPTIONS = indexNode.DEFAULT_SYSTEM_OPTIONS;
46
+ exports.DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = indexNode.DEFAULT_TOKEN_RENEWAL_OFFSET_SEC;
47
+ exports.DefaultStorageClass = indexNode.DefaultStorageClass;
48
+ exports.Errors = indexNode.Errors;
49
+ exports.GrantType = indexNode.GrantType;
50
+ exports.HeaderNames = indexNode.HeaderNames;
51
+ exports.HttpStatus = indexNode.HttpStatus;
52
+ exports.IntFields = indexNode.IntFields;
53
+ exports.InteractionRequiredAuthError = indexNode.InteractionRequiredAuthError;
54
+ exports.InteractionRequiredAuthErrorCodes = indexNode.InteractionRequiredAuthErrorCodes;
55
+ exports.InteractionRequiredAuthErrorMessage = indexNode.InteractionRequiredAuthErrorMessage;
56
+ exports.JsonWebTokenTypes = indexNode.JsonWebTokenTypes;
57
+ Object.defineProperty(exports, 'LogLevel', {
58
+ enumerable: true,
59
+ get: function () { return indexNode.LogLevel; }
60
+ });
61
+ exports.Logger = indexNode.Logger;
62
+ exports.NetworkManager = indexNode.NetworkManager;
63
+ exports.OIDC_DEFAULT_SCOPES = indexNode.OIDC_DEFAULT_SCOPES;
64
+ exports.ONE_DAY_IN_MS = indexNode.ONE_DAY_IN_MS;
65
+ exports.PasswordGrantConstants = indexNode.PasswordGrantConstants;
66
+ exports.PerformanceEventStatus = indexNode.PerformanceEventStatus;
67
+ exports.PerformanceEvents = indexNode.PerformanceEvents;
68
+ exports.PersistentCacheKeys = indexNode.PersistentCacheKeys;
69
+ exports.PopTokenGenerator = indexNode.PopTokenGenerator;
70
+ exports.PromptValue = indexNode.PromptValue;
71
+ exports.ProtocolMode = indexNode.ProtocolMode;
72
+ exports.ProtocolUtils = indexNode.ProtocolUtils;
73
+ exports.RefreshTokenClient = indexNode.RefreshTokenClient;
74
+ exports.RequestParameterBuilder = indexNode.RequestParameterBuilder;
75
+ exports.ResponseHandler = indexNode.ResponseHandler;
76
+ exports.ResponseMode = indexNode.ResponseMode;
77
+ exports.ScopeSet = indexNode.ScopeSet;
78
+ exports.ServerError = indexNode.ServerError;
79
+ exports.ServerResponseType = indexNode.ServerResponseType;
80
+ exports.ServerTelemetryManager = indexNode.ServerTelemetryManager;
81
+ exports.SilentFlowClient = indexNode.SilentFlowClient;
82
+ exports.StringUtils = indexNode.StringUtils;
83
+ exports.StubbedNetworkModule = indexNode.StubbedNetworkModule;
84
+ exports.THE_FAMILY_ID = indexNode.THE_FAMILY_ID;
85
+ exports.ThrottlingConstants = indexNode.ThrottlingConstants;
86
+ exports.ThrottlingUtils = indexNode.ThrottlingUtils;
87
+ exports.TimeUtils = indexNode.TimeUtils;
88
+ exports.TokenCacheContext = indexNode.TokenCacheContext;
89
+ exports.UrlString = indexNode.UrlString;
90
+ exports.UrlUtils = indexNode.UrlUtils;
91
+ exports.buildAccountToCache = indexNode.buildAccountToCache;
92
+ exports.buildClientInfo = indexNode.buildClientInfo;
93
+ exports.buildClientInfoFromHomeAccountId = indexNode.buildClientInfoFromHomeAccountId;
94
+ exports.buildStaticAuthorityOptions = indexNode.buildStaticAuthorityOptions;
95
+ exports.buildTenantProfile = indexNode.buildTenantProfile;
96
+ exports.createAuthError = indexNode.createAuthError;
97
+ exports.createClientAuthError = indexNode.createClientAuthError;
98
+ exports.createClientConfigurationError = indexNode.createClientConfigurationError;
99
+ exports.createInteractionRequiredAuthError = indexNode.createInteractionRequiredAuthError;
100
+ exports.formatAuthorityUri = indexNode.formatAuthorityUri;
101
+ exports.getClientAssertion = indexNode.getClientAssertion;
102
+ exports.getTenantIdFromIdTokenClaims = indexNode.getTenantIdFromIdTokenClaims;
103
+ exports.invoke = indexNode.invoke;
104
+ exports.invokeAsync = indexNode.invokeAsync;
105
+ exports.tenantIdMatchesHomeTenant = indexNode.tenantIdMatchesHomeTenant;
106
+ exports.updateAccountTenantProfileData = indexNode.updateAccountTenantProfileData;
107
+ exports.version = indexNode.version;
108
+ exports.JoseHeader = indexBrowser.JoseHeader;
109
+ exports.PerformanceClient = indexBrowser.PerformanceClient;
110
+ exports.StubPerformanceClient = indexBrowser.StubPerformanceClient;
111
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1 @@
1
+ {"type":"commonjs"}
@@ -0,0 +1,67 @@
1
+ import { TokenClaims } from "./TokenClaims.js";
2
+ /**
3
+ * Account object with the following signature:
4
+ * - homeAccountId - Home account identifier for this account object
5
+ * - environment - Entity which issued the token represented by the domain of the issuer (e.g. login.microsoftonline.com)
6
+ * - tenantId - Full tenant or organizational id that this account belongs to
7
+ * - username - preferred_username claim of the id_token that represents this account
8
+ * - localAccountId - Local, tenant-specific account identifer for this account object, usually used in legacy cases
9
+ * - name - Full name for the account, including given name and family name
10
+ * - idToken - raw ID token
11
+ * - idTokenClaims - Object contains claims from ID token
12
+ * - nativeAccountId - The user's native account ID
13
+ * - tenantProfiles - Map of tenant profile objects for each tenant that the account has authenticated with in the browser
14
+ */
15
+ export type AccountInfo = {
16
+ homeAccountId: string;
17
+ environment: string;
18
+ tenantId: string;
19
+ username: string;
20
+ localAccountId: string;
21
+ name?: string;
22
+ idToken?: string;
23
+ idTokenClaims?: TokenClaims & {
24
+ [key: string]: string | number | string[] | object | undefined | unknown;
25
+ };
26
+ nativeAccountId?: string;
27
+ authorityType?: string;
28
+ tenantProfiles?: Map<string, TenantProfile>;
29
+ };
30
+ /**
31
+ * Account details that vary across tenants for the same user
32
+ */
33
+ export type TenantProfile = Pick<AccountInfo, "tenantId" | "localAccountId" | "name"> & {
34
+ /**
35
+ * - isHomeTenant - True if this is the home tenant profile of the account, false if it's a guest tenant profile
36
+ */
37
+ isHomeTenant?: boolean;
38
+ };
39
+ export type ActiveAccountFilters = {
40
+ homeAccountId: string;
41
+ localAccountId: string;
42
+ tenantId?: string;
43
+ };
44
+ /**
45
+ * Returns true if tenantId matches the utid portion of homeAccountId
46
+ * @param tenantId
47
+ * @param homeAccountId
48
+ * @returns
49
+ */
50
+ export declare function tenantIdMatchesHomeTenant(tenantId?: string, homeAccountId?: string): boolean;
51
+ /**
52
+ * Build tenant profile
53
+ * @param homeAccountId - Home account identifier for this account object
54
+ * @param localAccountId - Local account identifer for this account object
55
+ * @param tenantId - Full tenant or organizational id that this account belongs to
56
+ * @param idTokenClaims - Claims from the ID token
57
+ * @returns
58
+ */
59
+ export declare function buildTenantProfile(homeAccountId: string, localAccountId: string, tenantId: string, idTokenClaims?: TokenClaims): TenantProfile;
60
+ /**
61
+ * Replaces account info that varies by tenant profile sourced from the ID token claims passed in with the tenant-specific account info
62
+ * @param baseAccountInfo
63
+ * @param idTokenClaims
64
+ * @returns
65
+ */
66
+ export declare function updateAccountTenantProfileData(baseAccountInfo: AccountInfo, tenantProfile?: TenantProfile, idTokenClaims?: TokenClaims, idTokenSecret?: string): AccountInfo;
67
+ //# sourceMappingURL=Acc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a,EAAE,MAAM,EACrB,cAAc,EAAE,MAAM,EACtB,QAAQ,EAAE,MAAM,EAChB,aAAa,CAAC,EAAE,WAAW,GAC5B,aAAa,CAyBf;AAED;;;;;GAKG;AACH,wBAAgB,8BAA8B,CAC1C,eAAe,EAAE,WAAW,EAC5B,aAAa,CAAC,EAAE,aAAa,EAC7B,aAAa,CAAC,EAAE,WAAW,EAC3B,aAAa,CAAC,EAAE,MAAM,GACvB,WAAW,CAgCb"}
@@ -0,0 +1,18 @@
1
+ import { TokenClaims } from "./TokenClaims.js";
2
+ /**
3
+ * Extract token by decoding the rawToken
4
+ *
5
+ * @param encodedToken
6
+ */
7
+ export declare function extractTokenClaims(encodedToken: string, base64Decode: (input: string) => string): TokenClaims;
8
+ /**
9
+ * decode a JWT
10
+ *
11
+ * @param authToken
12
+ */
13
+ export declare function getJWSPayload(authToken: string): string;
14
+ /**
15
+ * Determine if the token's max_age has transpired
16
+ */
17
+ export declare function checkMaxAge(authTime: number, maxAge: number): void;
18
+ //# sourceMappingURL=AuthToken.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AuthToken.d.ts","sourceRoot":"","sources":["../../../src/account/AuthToken.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAM/C;;;;GAIG;AACH,wBAAgB,kBAAkB,CAC9B,YAAY,EAAE,MAAM,EACpB,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,GACxC,WAAW,CAWb;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAkBvD;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAUlE"}
@@ -0,0 +1,10 @@
1
+ export type CcsCredential = {
2
+ credential: string;
3
+ type: CcsCredentialType;
4
+ };
5
+ export declare const CcsCredentialType: {
6
+ readonly HOME_ACCOUNT_ID: "home_account_id";
7
+ readonly UPN: "UPN";
8
+ };
9
+ export type CcsCredentialType = (typeof CcsCredentialType)[keyof typeof CcsCredentialType];
10
+ //# sourceMappingURL=CcsCredential.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CcsCredential.d.ts","sourceRoot":"","sources":["../../../src/account/CcsCredential.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,aAAa,GAAG;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,iBAAiB,CAAC;CAC3B,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;CAGpB,CAAC;AACX,MAAM,MAAM,iBAAiB,GACzB,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,OAAO,iBAAiB,CAAC,CAAC"}
@@ -0,0 +1,20 @@
1
+ export type ClientAssertionConfig = {
2
+ clientId: string;
3
+ tokenEndpoint?: string;
4
+ };
5
+ export type ClientAssertionCallback = (config: ClientAssertionConfig) => Promise<string>;
6
+ /**
7
+ * Client Assertion credential for Confidential Clients
8
+ */
9
+ export type ClientAssertion = {
10
+ assertion: string | ClientAssertionCallback;
11
+ assertionType: string;
12
+ };
13
+ /**
14
+ * Client Credentials set for Confidential Clients
15
+ */
16
+ export type ClientCredentials = {
17
+ clientSecret?: string;
18
+ clientAssertion?: ClientAssertion;
19
+ };
20
+ //# sourceMappingURL=ClientCredentials.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ClientCredentials.d.ts","sourceRoot":"","sources":["../../../src/account/ClientCredentials.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,qBAAqB,GAAG;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,CAClC,MAAM,EAAE,qBAAqB,KAC5B,OAAO,CAAC,MAAM,CAAC,CAAC;AAErB;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC1B,SAAS,EAAE,MAAM,GAAG,uBAAuB,CAAC;IAC5C,aAAa,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,eAAe,CAAC;CACrC,CAAC"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Client info object which consists of two IDs. Need to add more info here.
3
+ */
4
+ export type ClientInfo = {
5
+ uid: string;
6
+ utid: string;
7
+ };
8
+ /**
9
+ * Function to build a client info object from server clientInfo string
10
+ * @param rawClientInfo
11
+ * @param crypto
12
+ */
13
+ export declare function buildClientInfo(rawClientInfo: string, base64Decode: (input: string) => string): ClientInfo;
14
+ /**
15
+ * Function to build a client info object from cached homeAccountId string
16
+ * @param homeAccountId
17
+ */
18
+ export declare function buildClientInfoFromHomeAccountId(homeAccountId: string): ClientInfo;
19
+ //# sourceMappingURL=ClientInfo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ClientInfo.d.ts","sourceRoot":"","sources":["../../../src/account/ClientInfo.ts"],"names":[],"mappings":"AAWA;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,eAAe,CAC3B,aAAa,EAAE,MAAM,EACrB,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,GACxC,UAAU,CAaZ;AAED;;;GAGG;AACH,wBAAgB,gCAAgC,CAC5C,aAAa,EAAE,MAAM,GACtB,UAAU,CAiBZ"}
@@ -0,0 +1,84 @@
1
+ /**
2
+ * Type which describes Id Token claims known by MSAL.
3
+ */
4
+ export type TokenClaims = {
5
+ /**
6
+ * Audience
7
+ */
8
+ aud?: string;
9
+ /**
10
+ * Issuer
11
+ */
12
+ iss?: string;
13
+ /**
14
+ * Issued at
15
+ */
16
+ iat?: number;
17
+ /**
18
+ * Not valid before
19
+ */
20
+ nbf?: number;
21
+ /**
22
+ * Immutable object identifier, this ID uniquely identifies the user across applications
23
+ */
24
+ oid?: string;
25
+ /**
26
+ * Immutable subject identifier, this is a pairwise identifier - it is unique to a particular application ID
27
+ */
28
+ sub?: string;
29
+ /**
30
+ * Users' tenant or '9188040d-6c67-4c5b-b112-36a304b66dad' for personal accounts.
31
+ */
32
+ tid?: string;
33
+ /**
34
+ * Trusted Framework Policy (B2C) The name of the policy that was used to acquire the ID token.
35
+ */
36
+ tfp?: string;
37
+ /**
38
+ * Authentication Context Class Reference (B2C) Used only with older policies.
39
+ */
40
+ acr?: string;
41
+ ver?: string;
42
+ upn?: string;
43
+ preferred_username?: string;
44
+ login_hint?: string;
45
+ emails?: string[];
46
+ name?: string;
47
+ nonce?: string;
48
+ /**
49
+ * Expiration
50
+ */
51
+ exp?: number;
52
+ home_oid?: string;
53
+ sid?: string;
54
+ cloud_instance_host_name?: string;
55
+ cnf?: {
56
+ kid: string;
57
+ };
58
+ x5c_ca?: string[];
59
+ ts?: number;
60
+ at?: string;
61
+ u?: string;
62
+ p?: string;
63
+ m?: string;
64
+ roles?: string[];
65
+ amr?: string[];
66
+ idp?: string;
67
+ auth_time?: number;
68
+ /**
69
+ * Region of the resource tenant
70
+ */
71
+ tenant_region_scope?: string;
72
+ tenant_region_sub_scope?: string;
73
+ };
74
+ /**
75
+ * Gets tenantId from available ID token claims to set as credential realm with the following precedence:
76
+ * 1. tid - if the token is acquired from an Azure AD tenant tid will be present
77
+ * 2. tfp - if the token is acquired from a modern B2C tenant tfp should be present
78
+ * 3. acr - if the token is acquired from a legacy B2C tenant acr should be present
79
+ * Downcased to match the realm case-insensitive comparison requirements
80
+ * @param idTokenClaims
81
+ * @returns
82
+ */
83
+ export declare function getTenantIdFromIdTokenClaims(idTokenClaims?: TokenClaims): string | null;
84
+ //# sourceMappingURL=TokenClaims.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"T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AAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,uBAAuB,CAAC,EAAE,MAAM,CAAC;CACpC,CAAC;AAEF;;;;;;;;GAQG;AACH,wBAAgB,4BAA4B,CACxC,aAAa,CAAC,EAAE,WAAW,GAC5B,MAAM,GAAG,IAAI,CAOf"}
@@ -0,0 +1,255 @@
1
+ import { AuthorityType } from "./AuthorityType.js";
2
+ import { OpenIdConfigResponse } from "./OpenIdConfigResponse.js";
3
+ import { IUri } from "../url/IUri.js";
4
+ import { INetworkModule } from "../network/INetworkModule.js";
5
+ import { ProtocolMode } from "./ProtocolMode.js";
6
+ import { ICacheManager } from "../cache/interface/ICacheManager.js";
7
+ import { AuthorityOptions, StaticAuthorityOptions } from "./AuthorityOptions.js";
8
+ import { CloudDiscoveryMetadata } from "./CloudDiscoveryMetadata.js";
9
+ import { RegionDiscoveryMetadata } from "./RegionDiscoveryMetadata.js";
10
+ import { AzureCloudOptions } from "../config/ClientConfiguration.js";
11
+ import { Logger } from "../logger/Logger.js";
12
+ import { IPerformanceClient } from "../telemetry/performance/IPerformanceClient.js";
13
+ /**
14
+ * The authority class validates the authority URIs used by the user, and retrieves the OpenID Configuration Data from the
15
+ * endpoint. It will store the pertinent config data in this object for use during token calls.
16
+ * @internal
17
+ */
18
+ export declare class Authority {
19
+ private _canonicalAuthority;
20
+ private _canonicalAuthorityUrlComponents;
21
+ protected networkInterface: INetworkModule;
22
+ protected cacheManager: ICacheManager;
23
+ private authorityOptions;
24
+ private metadata;
25
+ private regionDiscovery;
26
+ regionDiscoveryMetadata: RegionDiscoveryMetadata;
27
+ private logger;
28
+ protected performanceClient: IPerformanceClient | undefined;
29
+ protected correlationId: string;
30
+ private managedIdentity;
31
+ private static reservedTenantDomains;
32
+ constructor(authority: string, networkInterface: INetworkModule, cacheManager: ICacheManager, authorityOptions: AuthorityOptions, logger: Logger, correlationId: string, performanceClient?: IPerformanceClient, managedIdentity?: boolean);
33
+ /**
34
+ * Get {@link AuthorityType}
35
+ * @param authorityUri {@link IUri}
36
+ * @private
37
+ */
38
+ private getAuthorityType;
39
+ get authorityType(): AuthorityType;
40
+ /**
41
+ * ProtocolMode enum representing the way endpoints are constructed.
42
+ */
43
+ get protocolMode(): ProtocolMode;
44
+ /**
45
+ * Returns authorityOptions which can be used to reinstantiate a new authority instance
46
+ */
47
+ get options(): AuthorityOptions;
48
+ /**
49
+ * A URL that is the authority set by the developer
50
+ */
51
+ get canonicalAuthority(): string;
52
+ /**
53
+ * Sets canonical authority.
54
+ */
55
+ set canonicalAuthority(url: string);
56
+ /**
57
+ * Get authority components.
58
+ */
59
+ get canonicalAuthorityUrlComponents(): IUri;
60
+ /**
61
+ * Get hostname and port i.e. login.microsoftonline.com
62
+ */
63
+ get hostnameAndPort(): string;
64
+ /**
65
+ * Get tenant for authority.
66
+ */
67
+ get tenant(): string;
68
+ /**
69
+ * OAuth /authorize endpoint for requests
70
+ */
71
+ get authorizationEndpoint(): string;
72
+ /**
73
+ * OAuth /token endpoint for requests
74
+ */
75
+ get tokenEndpoint(): string;
76
+ get deviceCodeEndpoint(): string;
77
+ /**
78
+ * OAuth logout endpoint for requests
79
+ */
80
+ get endSessionEndpoint(): string;
81
+ /**
82
+ * OAuth issuer for requests
83
+ */
84
+ get selfSignedJwtAudience(): string;
85
+ /**
86
+ * Jwks_uri for token signing keys
87
+ */
88
+ get jwksUri(): string;
89
+ /**
90
+ * Returns a flag indicating that tenant name can be replaced in authority {@link IUri}
91
+ * @param authorityUri {@link IUri}
92
+ * @private
93
+ */
94
+ private canReplaceTenant;
95
+ /**
96
+ * Replaces tenant in url path with current tenant. Defaults to common.
97
+ * @param urlString
98
+ */
99
+ private replaceTenant;
100
+ /**
101
+ * Replaces path such as tenant or policy with the current tenant or policy.
102
+ * @param urlString
103
+ */
104
+ private replacePath;
105
+ /**
106
+ * The default open id configuration endpoint for any canonical authority.
107
+ */
108
+ protected get defaultOpenIdConfigurationEndpoint(): string;
109
+ /**
110
+ * Boolean that returns whether or not tenant discovery has been completed.
111
+ */
112
+ discoveryComplete(): boolean;
113
+ /**
114
+ * Perform endpoint discovery to discover aliases, preferred_cache, preferred_network
115
+ * and the /authorize, /token and logout endpoints.
116
+ */
117
+ resolveEndpointsAsync(): Promise<void>;
118
+ /**
119
+ * Returns metadata entity from cache if it exists, otherwiser returns a new metadata entity built
120
+ * from the configured canonical authority
121
+ * @returns
122
+ */
123
+ private getCurrentMetadataEntity;
124
+ /**
125
+ * Updates cached metadata based on metadata source and sets the instance's metadata
126
+ * property to the same value
127
+ * @param metadataEntity
128
+ * @param cloudDiscoverySource
129
+ * @param endpointMetadataResult
130
+ */
131
+ private updateCachedMetadata;
132
+ /**
133
+ * Update AuthorityMetadataEntity with new endpoints and return where the information came from
134
+ * @param metadataEntity
135
+ */
136
+ private updateEndpointMetadata;
137
+ /**
138
+ * Updates endpoint metadata from local sources and returns where the information was retrieved from and the metadata config
139
+ * response if the source is hardcoded metadata
140
+ * @param metadataEntity
141
+ * @returns
142
+ */
143
+ private updateEndpointMetadataFromLocalSources;
144
+ /**
145
+ * Compares the number of url components after the domain to determine if the cached
146
+ * authority metadata can be used for the requested authority. Protects against same domain different
147
+ * authority such as login.microsoftonline.com/tenant and login.microsoftonline.com/tfp/tenant/policy
148
+ * @param metadataEntity
149
+ */
150
+ private isAuthoritySameType;
151
+ /**
152
+ * Parse authorityMetadata config option
153
+ */
154
+ private getEndpointMetadataFromConfig;
155
+ /**
156
+ * Gets OAuth endpoints from the given OpenID configuration endpoint.
157
+ *
158
+ * @param hasHardcodedMetadata boolean
159
+ */
160
+ private getEndpointMetadataFromNetwork;
161
+ /**
162
+ * Get OAuth endpoints for common authorities.
163
+ */
164
+ private getEndpointMetadataFromHardcodedValues;
165
+ /**
166
+ * Update the retrieved metadata with regional information.
167
+ * User selected Azure region will be used if configured.
168
+ */
169
+ private updateMetadataWithRegionalInformation;
170
+ /**
171
+ * Updates the AuthorityMetadataEntity with new aliases, preferred_network and preferred_cache
172
+ * and returns where the information was retrieved from
173
+ * @param metadataEntity
174
+ * @returns AuthorityMetadataSource
175
+ */
176
+ private updateCloudDiscoveryMetadata;
177
+ private updateCloudDiscoveryMetadataFromLocalSources;
178
+ /**
179
+ * Parse cloudDiscoveryMetadata config or check knownAuthorities
180
+ */
181
+ private getCloudDiscoveryMetadataFromConfig;
182
+ /**
183
+ * Called to get metadata from network if CloudDiscoveryMetadata was not populated by config
184
+ *
185
+ * @param hasHardcodedMetadata boolean
186
+ */
187
+ private getCloudDiscoveryMetadataFromNetwork;
188
+ /**
189
+ * Helper function to determine if this host is included in the knownAuthorities config option
190
+ */
191
+ private isInKnownAuthorities;
192
+ /**
193
+ * helper function to populate the authority based on azureCloudOptions
194
+ * @param authorityString
195
+ * @param azureCloudOptions
196
+ */
197
+ static generateAuthority(authorityString: string, azureCloudOptions?: AzureCloudOptions): string;
198
+ /**
199
+ * Creates cloud discovery metadata object from a given host
200
+ * @param host
201
+ */
202
+ static createCloudDiscoveryMetadataFromHost(host: string): CloudDiscoveryMetadata;
203
+ /**
204
+ * helper function to generate environment from authority object
205
+ */
206
+ getPreferredCache(): string;
207
+ /**
208
+ * Returns whether or not the provided host is an alias of this authority instance
209
+ * @param host
210
+ */
211
+ isAlias(host: string): boolean;
212
+ /**
213
+ * Returns whether or not the provided host is an alias of a known Microsoft authority for purposes of endpoint discovery
214
+ * @param host
215
+ */
216
+ isAliasOfKnownMicrosoftAuthority(host: string): boolean;
217
+ /**
218
+ * Checks whether the provided host is that of a public cloud authority
219
+ *
220
+ * @param authority string
221
+ * @returns bool
222
+ */
223
+ static isPublicCloudAuthority(host: string): boolean;
224
+ /**
225
+ * Rebuild the authority string with the region
226
+ *
227
+ * @param host string
228
+ * @param region string
229
+ */
230
+ static buildRegionalAuthorityString(host: string, region: string, queryString?: string): string;
231
+ /**
232
+ * Replace the endpoints in the metadata object with their regional equivalents.
233
+ *
234
+ * @param metadata OpenIdConfigResponse
235
+ * @param azureRegion string
236
+ */
237
+ static replaceWithRegionalInformation(metadata: OpenIdConfigResponse, azureRegion: string): OpenIdConfigResponse;
238
+ /**
239
+ * Transform CIAM_AUTHORIY as per the below rules:
240
+ * If no path segments found and it is a CIAM authority (hostname ends with .ciamlogin.com), then transform it
241
+ *
242
+ * NOTE: The transformation path should go away once STS supports CIAM with the format: `tenantIdorDomain.ciamlogin.com`
243
+ * `ciamlogin.com` can also change in the future and we should accommodate the same
244
+ *
245
+ * @param authority
246
+ */
247
+ static transformCIAMAuthority(authority: string): string;
248
+ }
249
+ /**
250
+ * Extract tenantId from authority
251
+ */
252
+ export declare function getTenantFromAuthorityString(authority: string): string | undefined;
253
+ export declare function formatAuthorityUri(authorityUri: string): string;
254
+ export declare function buildStaticAuthorityOptions(authOptions: Partial<AuthorityOptions>): StaticAuthorityOptions;
255
+ //# sourceMappingURL=Authority.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Authority.d.ts","sourceRoot":"","sources":["../../../src/authority/Authority.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAEH,oBAAoB,EACvB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAKtC,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAiB9D,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEpE,OAAO,EACH,gBAAgB,EAEhB,sBAAsB,EACzB,MAAM,uBAAuB,CAAC;AAS/B,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAErE,OAAO,EAAE,uBAAuB,EAAE,M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;;OAIG;IACH,MAAM,CAAC,iBAAiB,CACpB,eAAe,EAAE,MAAM,EACvB,iBAAiB,CAAC,EAAE,iBAAiB,GACtC,MAAM;IAkBT;;;OAGG;IACH,MAAM,CAAC,oCAAoC,CACvC,IAAI,EAAE,MAAM,GACb,sBAAsB;IAQzB;;OAEG;IACH,iBAAiB,IAAI,MAAM;IAY3B;;;OAGG;IACH,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAI9B;;;OAGG;IACH,gCAAgC,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAIvD;;;;;OAKG;IACH,MAAM,CAAC,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAIpD;;;;;OAKG;IACH,MAAM,CAAC,4BAA4B,CAC/B,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,WAAW,CAAC,EAAE,MAAM,GACrB,MAAM;IAyBT;;;;;OAKG;IACH,MAAM,CAAC,8BAA8B,CACjC,QAAQ,EAAE,oBAAoB,EAC9B,WAAW,EAAE,MAAM,GACpB,oBAAoB;IAyBvB;;;;;;;;OAQG;IACH,MAAM,CAAC,sBAAsB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM;CAmB3D;AAED;;GAEG;AACH,wBAAgB,4BAA4B,CACxC,SAAS,EAAE,MAAM,GAClB,MAAM,GAAG,SAAS,CAsBpB;AAED,wBAAgB,kBAAkB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAI/D;AAED,wBAAgB,2BAA2B,CACvC,WAAW,EAAE,OAAO,CAAC,gBAAgB,CAAC,GACvC,sBAAsB,CAoBxB"}
@@ -0,0 +1,19 @@
1
+ import { Authority } from "./Authority.js";
2
+ import { INetworkModule } from "../network/INetworkModule.js";
3
+ import { ICacheManager } from "../cache/interface/ICacheManager.js";
4
+ import { AuthorityOptions } from "./AuthorityOptions.js";
5
+ import { Logger } from "../logger/Logger.js";
6
+ import { IPerformanceClient } from "../telemetry/performance/IPerformanceClient.js";
7
+ /**
8
+ * Create an authority object of the correct type based on the url
9
+ * Performs basic authority validation - checks to see if the authority is of a valid type (i.e. aad, b2c, adfs)
10
+ *
11
+ * Also performs endpoint discovery.
12
+ *
13
+ * @param authorityUri
14
+ * @param networkClient
15
+ * @param protocolMode
16
+ * @internal
17
+ */
18
+ export declare function createDiscoveredInstance(authorityUri: string, networkClient: INetworkModule, cacheManager: ICacheManager, authorityOptions: AuthorityOptions, logger: Logger, correlationId: string, performanceClient?: IPerformanceClient): Promise<Authority>;
19
+ //# sourceMappingURL=AuthorityFactory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AuthorityFactory.d.ts","sourceRoot":"","sources":["../../../src/authority/AuthorityFactory.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAsB,MAAM,gBAAgB,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAK9D,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AAIpF;;;;;;;;;;GAUG;AACH,wBAAsB,wBAAwB,CAC1C,YAAY,EAAE,MAAM,EACpB,aAAa,EAAE,cAAc,EAC7B,YAAY,EAAE,aAAa,EAC3B,gBAAgB,EAAE,gBAAgB,EAClC,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,MAAM,EACrB,iBAAiB,CAAC,EAAE,kBAAkB,GACvC,OAAO,CAAC,SAAS,CAAC,CAoCpB"}