@azure/msal-browser 3.0.0-alpha.0 → 3.0.0-alpha.1

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 (385) hide show
  1. package/dist/app/IPublicClientApplication.js +1 -1
  2. package/dist/app/PublicClientApplication.js +1 -1
  3. package/dist/broker/nativeBroker/NativeMessageHandler.js +1 -1
  4. package/dist/cache/AsyncMemoryStorage.js +1 -1
  5. package/dist/cache/BrowserCacheManager.js +1 -1
  6. package/dist/cache/BrowserStorage.js +1 -1
  7. package/dist/cache/CryptoKeyStore.js +1 -1
  8. package/dist/cache/DatabaseStorage.js +1 -1
  9. package/dist/cache/MemoryStorage.js +1 -1
  10. package/dist/cache/TokenCache.js +1 -1
  11. package/dist/config/Configuration.js +1 -1
  12. package/dist/controllers/ControllerFactory.js +1 -1
  13. package/dist/controllers/StandardController.js +1 -1
  14. package/dist/crypto/BrowserCrypto.js +1 -1
  15. package/dist/crypto/CryptoOps.js +1 -1
  16. package/dist/crypto/GuidGenerator.js +1 -1
  17. package/dist/crypto/ModernBrowserCrypto.js +1 -1
  18. package/dist/crypto/MsBrowserCrypto.js +1 -1
  19. package/dist/crypto/MsrBrowserCrypto.js +1 -1
  20. package/dist/crypto/PkceGenerator.js +1 -1
  21. package/dist/crypto/SignedHttpRequest.js +1 -1
  22. package/dist/encode/Base64Decode.js +1 -1
  23. package/dist/encode/Base64Encode.js +1 -1
  24. package/dist/error/BrowserAuthError.js +1 -1
  25. package/dist/error/BrowserConfigurationAuthError.js +1 -1
  26. package/dist/error/NativeAuthError.js +1 -1
  27. package/dist/event/EventHandler.js +1 -1
  28. package/dist/event/EventMessage.js +1 -1
  29. package/dist/event/EventType.js +1 -1
  30. package/dist/index.js +1 -1
  31. package/dist/interaction_client/BaseInteractionClient.js +1 -1
  32. package/dist/interaction_client/HybridSpaAuthorizationCodeClient.js +1 -1
  33. package/dist/interaction_client/NativeInteractionClient.js +1 -1
  34. package/dist/interaction_client/PopupClient.js +1 -1
  35. package/dist/interaction_client/RedirectClient.js +1 -1
  36. package/dist/interaction_client/SilentAuthCodeClient.js +1 -1
  37. package/dist/interaction_client/SilentCacheClient.js +1 -1
  38. package/dist/interaction_client/SilentIframeClient.js +1 -1
  39. package/dist/interaction_client/SilentRefreshClient.js +1 -1
  40. package/dist/interaction_client/StandardInteractionClient.js +1 -1
  41. package/dist/interaction_handler/InteractionHandler.js +1 -1
  42. package/dist/interaction_handler/RedirectHandler.js +1 -1
  43. package/dist/interaction_handler/SilentHandler.js +1 -1
  44. package/dist/internals.js +1 -1
  45. package/dist/navigation/NavigationClient.js +1 -1
  46. package/dist/network/FetchClient.js +1 -1
  47. package/dist/network/XhrClient.js +1 -1
  48. package/dist/operatingcontext/BaseOperatingContext.js +1 -1
  49. package/dist/operatingcontext/StandardOperatingContext.js +1 -1
  50. package/dist/operatingcontext/TeamsAppOperatingContext.js +1 -1
  51. package/dist/packageMetadata.d.ts +1 -1
  52. package/dist/packageMetadata.js +2 -2
  53. package/dist/telemetry/BrowserPerformanceClient.js +1 -1
  54. package/dist/telemetry/BrowserPerformanceMeasurement.js +1 -1
  55. package/dist/utils/BrowserConstants.js +1 -1
  56. package/dist/utils/BrowserProtocolUtils.js +1 -1
  57. package/dist/utils/BrowserStringUtils.js +1 -1
  58. package/dist/utils/BrowserUtils.js +1 -1
  59. package/dist/utils/MathUtils.js +1 -1
  60. package/package.json +5 -8
  61. package/node_modules/@azure/msal-common/LICENSE +0 -21
  62. package/node_modules/@azure/msal-common/README.md +0 -62
  63. package/node_modules/@azure/msal-common/dist/account/AccountInfo.d.ts +0 -32
  64. package/node_modules/@azure/msal-common/dist/account/AccountInfo.d.ts.map +0 -1
  65. package/node_modules/@azure/msal-common/dist/account/AuthToken.d.ts +0 -21
  66. package/node_modules/@azure/msal-common/dist/account/AuthToken.d.ts.map +0 -1
  67. package/node_modules/@azure/msal-common/dist/account/AuthToken.js +0 -56
  68. package/node_modules/@azure/msal-common/dist/account/AuthToken.js.map +0 -1
  69. package/node_modules/@azure/msal-common/dist/account/CcsCredential.d.ts +0 -9
  70. package/node_modules/@azure/msal-common/dist/account/CcsCredential.d.ts.map +0 -1
  71. package/node_modules/@azure/msal-common/dist/account/CcsCredential.js +0 -14
  72. package/node_modules/@azure/msal-common/dist/account/CcsCredential.js.map +0 -1
  73. package/node_modules/@azure/msal-common/dist/account/ClientCredentials.d.ts +0 -15
  74. package/node_modules/@azure/msal-common/dist/account/ClientCredentials.d.ts.map +0 -1
  75. package/node_modules/@azure/msal-common/dist/account/ClientInfo.d.ts +0 -20
  76. package/node_modules/@azure/msal-common/dist/account/ClientInfo.d.ts.map +0 -1
  77. package/node_modules/@azure/msal-common/dist/account/ClientInfo.js +0 -46
  78. package/node_modules/@azure/msal-common/dist/account/ClientInfo.js.map +0 -1
  79. package/node_modules/@azure/msal-common/dist/account/DecodedAuthToken.d.ts +0 -9
  80. package/node_modules/@azure/msal-common/dist/account/DecodedAuthToken.d.ts.map +0 -1
  81. package/node_modules/@azure/msal-common/dist/account/TokenClaims.d.ts +0 -66
  82. package/node_modules/@azure/msal-common/dist/account/TokenClaims.d.ts.map +0 -1
  83. package/node_modules/@azure/msal-common/dist/authority/Authority.d.ts +0 -216
  84. package/node_modules/@azure/msal-common/dist/authority/Authority.d.ts.map +0 -1
  85. package/node_modules/@azure/msal-common/dist/authority/Authority.js +0 -688
  86. package/node_modules/@azure/msal-common/dist/authority/Authority.js.map +0 -1
  87. package/node_modules/@azure/msal-common/dist/authority/AuthorityFactory.d.ts +0 -31
  88. package/node_modules/@azure/msal-common/dist/authority/AuthorityFactory.d.ts.map +0 -1
  89. package/node_modules/@azure/msal-common/dist/authority/AuthorityFactory.js +0 -58
  90. package/node_modules/@azure/msal-common/dist/authority/AuthorityFactory.js.map +0 -1
  91. package/node_modules/@azure/msal-common/dist/authority/AuthorityMetadata.d.ts +0 -623
  92. package/node_modules/@azure/msal-common/dist/authority/AuthorityMetadata.d.ts.map +0 -1
  93. package/node_modules/@azure/msal-common/dist/authority/AuthorityMetadata.js +0 -881
  94. package/node_modules/@azure/msal-common/dist/authority/AuthorityMetadata.js.map +0 -1
  95. package/node_modules/@azure/msal-common/dist/authority/AuthorityOptions.d.ts +0 -19
  96. package/node_modules/@azure/msal-common/dist/authority/AuthorityOptions.d.ts.map +0 -1
  97. package/node_modules/@azure/msal-common/dist/authority/AuthorityOptions.js +0 -24
  98. package/node_modules/@azure/msal-common/dist/authority/AuthorityOptions.js.map +0 -1
  99. package/node_modules/@azure/msal-common/dist/authority/AuthorityType.d.ts +0 -10
  100. package/node_modules/@azure/msal-common/dist/authority/AuthorityType.d.ts.map +0 -1
  101. package/node_modules/@azure/msal-common/dist/authority/AuthorityType.js +0 -19
  102. package/node_modules/@azure/msal-common/dist/authority/AuthorityType.js.map +0 -1
  103. package/node_modules/@azure/msal-common/dist/authority/AzureRegion.d.ts +0 -2
  104. package/node_modules/@azure/msal-common/dist/authority/AzureRegion.d.ts.map +0 -1
  105. package/node_modules/@azure/msal-common/dist/authority/AzureRegionConfiguration.d.ts +0 -6
  106. package/node_modules/@azure/msal-common/dist/authority/AzureRegionConfiguration.d.ts.map +0 -1
  107. package/node_modules/@azure/msal-common/dist/authority/CloudDiscoveryMetadata.d.ts +0 -6
  108. package/node_modules/@azure/msal-common/dist/authority/CloudDiscoveryMetadata.d.ts.map +0 -1
  109. package/node_modules/@azure/msal-common/dist/authority/CloudInstanceDiscoveryErrorResponse.d.ts +0 -14
  110. package/node_modules/@azure/msal-common/dist/authority/CloudInstanceDiscoveryErrorResponse.d.ts.map +0 -1
  111. package/node_modules/@azure/msal-common/dist/authority/CloudInstanceDiscoveryErrorResponse.js +0 -13
  112. package/node_modules/@azure/msal-common/dist/authority/CloudInstanceDiscoveryErrorResponse.js.map +0 -1
  113. package/node_modules/@azure/msal-common/dist/authority/CloudInstanceDiscoveryResponse.d.ts +0 -10
  114. package/node_modules/@azure/msal-common/dist/authority/CloudInstanceDiscoveryResponse.d.ts.map +0 -1
  115. package/node_modules/@azure/msal-common/dist/authority/CloudInstanceDiscoveryResponse.js +0 -13
  116. package/node_modules/@azure/msal-common/dist/authority/CloudInstanceDiscoveryResponse.js.map +0 -1
  117. package/node_modules/@azure/msal-common/dist/authority/ImdsOptions.d.ts +0 -6
  118. package/node_modules/@azure/msal-common/dist/authority/ImdsOptions.d.ts.map +0 -1
  119. package/node_modules/@azure/msal-common/dist/authority/OpenIdConfigResponse.d.ts +0 -12
  120. package/node_modules/@azure/msal-common/dist/authority/OpenIdConfigResponse.d.ts.map +0 -1
  121. package/node_modules/@azure/msal-common/dist/authority/OpenIdConfigResponse.js +0 -15
  122. package/node_modules/@azure/msal-common/dist/authority/OpenIdConfigResponse.js.map +0 -1
  123. package/node_modules/@azure/msal-common/dist/authority/ProtocolMode.d.ts +0 -8
  124. package/node_modules/@azure/msal-common/dist/authority/ProtocolMode.d.ts.map +0 -1
  125. package/node_modules/@azure/msal-common/dist/authority/ProtocolMode.js +0 -17
  126. package/node_modules/@azure/msal-common/dist/authority/ProtocolMode.js.map +0 -1
  127. package/node_modules/@azure/msal-common/dist/authority/RegionDiscovery.d.ts +0 -31
  128. package/node_modules/@azure/msal-common/dist/authority/RegionDiscovery.d.ts.map +0 -1
  129. package/node_modules/@azure/msal-common/dist/authority/RegionDiscovery.js +0 -116
  130. package/node_modules/@azure/msal-common/dist/authority/RegionDiscovery.js.map +0 -1
  131. package/node_modules/@azure/msal-common/dist/authority/RegionDiscoveryMetadata.d.ts +0 -7
  132. package/node_modules/@azure/msal-common/dist/authority/RegionDiscoveryMetadata.d.ts.map +0 -1
  133. package/node_modules/@azure/msal-common/dist/broker/nativeBroker/INativeBrokerPlugin.d.ts +0 -16
  134. package/node_modules/@azure/msal-common/dist/broker/nativeBroker/INativeBrokerPlugin.d.ts.map +0 -1
  135. package/node_modules/@azure/msal-common/dist/cache/CacheManager.d.ts +0 -444
  136. package/node_modules/@azure/msal-common/dist/cache/CacheManager.d.ts.map +0 -1
  137. package/node_modules/@azure/msal-common/dist/cache/CacheManager.js +0 -1024
  138. package/node_modules/@azure/msal-common/dist/cache/CacheManager.js.map +0 -1
  139. package/node_modules/@azure/msal-common/dist/cache/entities/AccessTokenEntity.d.ts +0 -57
  140. package/node_modules/@azure/msal-common/dist/cache/entities/AccessTokenEntity.d.ts.map +0 -1
  141. package/node_modules/@azure/msal-common/dist/cache/entities/AccessTokenEntity.js +0 -123
  142. package/node_modules/@azure/msal-common/dist/cache/entities/AccessTokenEntity.js.map +0 -1
  143. package/node_modules/@azure/msal-common/dist/cache/entities/AccountEntity.d.ts +0 -100
  144. package/node_modules/@azure/msal-common/dist/cache/entities/AccountEntity.d.ts.map +0 -1
  145. package/node_modules/@azure/msal-common/dist/cache/entities/AccountEntity.js +0 -259
  146. package/node_modules/@azure/msal-common/dist/cache/entities/AccountEntity.js.map +0 -1
  147. package/node_modules/@azure/msal-common/dist/cache/entities/AppMetadataEntity.d.ts +0 -40
  148. package/node_modules/@azure/msal-common/dist/cache/entities/AppMetadataEntity.d.ts.map +0 -1
  149. package/node_modules/@azure/msal-common/dist/cache/entities/AppMetadataEntity.js +0 -73
  150. package/node_modules/@azure/msal-common/dist/cache/entities/AppMetadataEntity.js.map +0 -1
  151. package/node_modules/@azure/msal-common/dist/cache/entities/AuthorityMetadataEntity.d.ts +0 -48
  152. package/node_modules/@azure/msal-common/dist/cache/entities/AuthorityMetadataEntity.d.ts.map +0 -1
  153. package/node_modules/@azure/msal-common/dist/cache/entities/AuthorityMetadataEntity.js +0 -85
  154. package/node_modules/@azure/msal-common/dist/cache/entities/AuthorityMetadataEntity.js.map +0 -1
  155. package/node_modules/@azure/msal-common/dist/cache/entities/CacheRecord.d.ts +0 -14
  156. package/node_modules/@azure/msal-common/dist/cache/entities/CacheRecord.d.ts.map +0 -1
  157. package/node_modules/@azure/msal-common/dist/cache/entities/CacheRecord.js +0 -18
  158. package/node_modules/@azure/msal-common/dist/cache/entities/CacheRecord.js.map +0 -1
  159. package/node_modules/@azure/msal-common/dist/cache/entities/CredentialEntity.d.ts +0 -89
  160. package/node_modules/@azure/msal-common/dist/cache/entities/CredentialEntity.d.ts.map +0 -1
  161. package/node_modules/@azure/msal-common/dist/cache/entities/CredentialEntity.js +0 -144
  162. package/node_modules/@azure/msal-common/dist/cache/entities/CredentialEntity.js.map +0 -1
  163. package/node_modules/@azure/msal-common/dist/cache/entities/IdTokenEntity.d.ts +0 -35
  164. package/node_modules/@azure/msal-common/dist/cache/entities/IdTokenEntity.d.ts.map +0 -1
  165. package/node_modules/@azure/msal-common/dist/cache/entities/IdTokenEntity.js +0 -64
  166. package/node_modules/@azure/msal-common/dist/cache/entities/IdTokenEntity.js.map +0 -1
  167. package/node_modules/@azure/msal-common/dist/cache/entities/RefreshTokenEntity.d.ts +0 -37
  168. package/node_modules/@azure/msal-common/dist/cache/entities/RefreshTokenEntity.d.ts.map +0 -1
  169. package/node_modules/@azure/msal-common/dist/cache/entities/RefreshTokenEntity.js +0 -67
  170. package/node_modules/@azure/msal-common/dist/cache/entities/RefreshTokenEntity.js.map +0 -1
  171. package/node_modules/@azure/msal-common/dist/cache/entities/ServerTelemetryEntity.d.ts +0 -13
  172. package/node_modules/@azure/msal-common/dist/cache/entities/ServerTelemetryEntity.d.ts.map +0 -1
  173. package/node_modules/@azure/msal-common/dist/cache/entities/ServerTelemetryEntity.js +0 -34
  174. package/node_modules/@azure/msal-common/dist/cache/entities/ServerTelemetryEntity.js.map +0 -1
  175. package/node_modules/@azure/msal-common/dist/cache/entities/ThrottlingEntity.d.ts +0 -14
  176. package/node_modules/@azure/msal-common/dist/cache/entities/ThrottlingEntity.d.ts.map +0 -1
  177. package/node_modules/@azure/msal-common/dist/cache/entities/ThrottlingEntity.js +0 -30
  178. package/node_modules/@azure/msal-common/dist/cache/entities/ThrottlingEntity.js.map +0 -1
  179. package/node_modules/@azure/msal-common/dist/cache/interface/ICacheManager.d.ts +0 -166
  180. package/node_modules/@azure/msal-common/dist/cache/interface/ICacheManager.d.ts.map +0 -1
  181. package/node_modules/@azure/msal-common/dist/cache/interface/ICachePlugin.d.ts +0 -6
  182. package/node_modules/@azure/msal-common/dist/cache/interface/ICachePlugin.d.ts.map +0 -1
  183. package/node_modules/@azure/msal-common/dist/cache/interface/ISerializableTokenCache.d.ts +0 -5
  184. package/node_modules/@azure/msal-common/dist/cache/interface/ISerializableTokenCache.d.ts.map +0 -1
  185. package/node_modules/@azure/msal-common/dist/cache/persistence/TokenCacheContext.d.ts +0 -24
  186. package/node_modules/@azure/msal-common/dist/cache/persistence/TokenCacheContext.d.ts.map +0 -1
  187. package/node_modules/@azure/msal-common/dist/cache/persistence/TokenCacheContext.js +0 -30
  188. package/node_modules/@azure/msal-common/dist/cache/persistence/TokenCacheContext.js.map +0 -1
  189. package/node_modules/@azure/msal-common/dist/cache/utils/CacheTypes.d.ts +0 -63
  190. package/node_modules/@azure/msal-common/dist/cache/utils/CacheTypes.d.ts.map +0 -1
  191. package/node_modules/@azure/msal-common/dist/client/AuthorizationCodeClient.d.ts +0 -72
  192. package/node_modules/@azure/msal-common/dist/client/AuthorizationCodeClient.d.ts.map +0 -1
  193. package/node_modules/@azure/msal-common/dist/client/AuthorizationCodeClient.js +0 -453
  194. package/node_modules/@azure/msal-common/dist/client/AuthorizationCodeClient.js.map +0 -1
  195. package/node_modules/@azure/msal-common/dist/client/BaseClient.d.ts +0 -51
  196. package/node_modules/@azure/msal-common/dist/client/BaseClient.d.ts.map +0 -1
  197. package/node_modules/@azure/msal-common/dist/client/BaseClient.js +0 -107
  198. package/node_modules/@azure/msal-common/dist/client/BaseClient.js.map +0 -1
  199. package/node_modules/@azure/msal-common/dist/client/RefreshTokenClient.d.ts +0 -35
  200. package/node_modules/@azure/msal-common/dist/client/RefreshTokenClient.d.ts.map +0 -1
  201. package/node_modules/@azure/msal-common/dist/client/RefreshTokenClient.js +0 -260
  202. package/node_modules/@azure/msal-common/dist/client/RefreshTokenClient.js.map +0 -1
  203. package/node_modules/@azure/msal-common/dist/client/SilentFlowClient.d.ts +0 -25
  204. package/node_modules/@azure/msal-common/dist/client/SilentFlowClient.d.ts.map +0 -1
  205. package/node_modules/@azure/msal-common/dist/client/SilentFlowClient.js +0 -108
  206. package/node_modules/@azure/msal-common/dist/client/SilentFlowClient.js.map +0 -1
  207. package/node_modules/@azure/msal-common/dist/config/AppTokenProvider.d.ts +0 -39
  208. package/node_modules/@azure/msal-common/dist/config/AppTokenProvider.d.ts.map +0 -1
  209. package/node_modules/@azure/msal-common/dist/config/ClientConfiguration.d.ts +0 -134
  210. package/node_modules/@azure/msal-common/dist/config/ClientConfiguration.d.ts.map +0 -1
  211. package/node_modules/@azure/msal-common/dist/config/ClientConfiguration.js +0 -101
  212. package/node_modules/@azure/msal-common/dist/config/ClientConfiguration.js.map +0 -1
  213. package/node_modules/@azure/msal-common/dist/crypto/ICrypto.d.ts +0 -63
  214. package/node_modules/@azure/msal-common/dist/crypto/ICrypto.d.ts.map +0 -1
  215. package/node_modules/@azure/msal-common/dist/crypto/ICrypto.js +0 -49
  216. package/node_modules/@azure/msal-common/dist/crypto/ICrypto.js.map +0 -1
  217. package/node_modules/@azure/msal-common/dist/crypto/IGuidGenerator.d.ts +0 -5
  218. package/node_modules/@azure/msal-common/dist/crypto/IGuidGenerator.d.ts.map +0 -1
  219. package/node_modules/@azure/msal-common/dist/crypto/JoseHeader.d.ts +0 -22
  220. package/node_modules/@azure/msal-common/dist/crypto/JoseHeader.d.ts.map +0 -1
  221. package/node_modules/@azure/msal-common/dist/crypto/JoseHeader.js +0 -44
  222. package/node_modules/@azure/msal-common/dist/crypto/JoseHeader.js.map +0 -1
  223. package/node_modules/@azure/msal-common/dist/crypto/PopTokenGenerator.d.ts +0 -58
  224. package/node_modules/@azure/msal-common/dist/crypto/PopTokenGenerator.d.ts.map +0 -1
  225. package/node_modules/@azure/msal-common/dist/crypto/PopTokenGenerator.js +0 -92
  226. package/node_modules/@azure/msal-common/dist/crypto/PopTokenGenerator.js.map +0 -1
  227. package/node_modules/@azure/msal-common/dist/crypto/SignedHttpRequest.d.ts +0 -12
  228. package/node_modules/@azure/msal-common/dist/crypto/SignedHttpRequest.d.ts.map +0 -1
  229. package/node_modules/@azure/msal-common/dist/error/AuthError.d.ts +0 -48
  230. package/node_modules/@azure/msal-common/dist/error/AuthError.d.ts.map +0 -1
  231. package/node_modules/@azure/msal-common/dist/error/AuthError.js +0 -58
  232. package/node_modules/@azure/msal-common/dist/error/AuthError.js.map +0 -1
  233. package/node_modules/@azure/msal-common/dist/error/ClientAuthError.d.ts +0 -413
  234. package/node_modules/@azure/msal-common/dist/error/ClientAuthError.d.ts.map +0 -1
  235. package/node_modules/@azure/msal-common/dist/error/ClientAuthError.js +0 -526
  236. package/node_modules/@azure/msal-common/dist/error/ClientAuthError.js.map +0 -1
  237. package/node_modules/@azure/msal-common/dist/error/ClientConfigurationError.d.ts +0 -199
  238. package/node_modules/@azure/msal-common/dist/error/ClientConfigurationError.d.ts.map +0 -1
  239. package/node_modules/@azure/msal-common/dist/error/ClientConfigurationError.js +0 -256
  240. package/node_modules/@azure/msal-common/dist/error/ClientConfigurationError.js.map +0 -1
  241. package/node_modules/@azure/msal-common/dist/error/InteractionRequiredAuthError.d.ts +0 -60
  242. package/node_modules/@azure/msal-common/dist/error/InteractionRequiredAuthError.d.ts.map +0 -1
  243. package/node_modules/@azure/msal-common/dist/error/InteractionRequiredAuthError.js +0 -86
  244. package/node_modules/@azure/msal-common/dist/error/InteractionRequiredAuthError.js.map +0 -1
  245. package/node_modules/@azure/msal-common/dist/error/JoseHeaderError.d.ts +0 -29
  246. package/node_modules/@azure/msal-common/dist/error/JoseHeaderError.d.ts.map +0 -1
  247. package/node_modules/@azure/msal-common/dist/error/JoseHeaderError.js +0 -46
  248. package/node_modules/@azure/msal-common/dist/error/JoseHeaderError.js.map +0 -1
  249. package/node_modules/@azure/msal-common/dist/error/ServerError.d.ts +0 -8
  250. package/node_modules/@azure/msal-common/dist/error/ServerError.d.ts.map +0 -1
  251. package/node_modules/@azure/msal-common/dist/error/ServerError.js +0 -21
  252. package/node_modules/@azure/msal-common/dist/error/ServerError.js.map +0 -1
  253. package/node_modules/@azure/msal-common/dist/index.cjs.js +0 -8975
  254. package/node_modules/@azure/msal-common/dist/index.cjs.js.map +0 -1
  255. package/node_modules/@azure/msal-common/dist/index.d.ts +0 -94
  256. package/node_modules/@azure/msal-common/dist/index.d.ts.map +0 -1
  257. package/node_modules/@azure/msal-common/dist/index.js +0 -54
  258. package/node_modules/@azure/msal-common/dist/index.js.map +0 -1
  259. package/node_modules/@azure/msal-common/dist/logger/Logger.d.ts +0 -96
  260. package/node_modules/@azure/msal-common/dist/logger/Logger.d.ts.map +0 -1
  261. package/node_modules/@azure/msal-common/dist/logger/Logger.js +0 -205
  262. package/node_modules/@azure/msal-common/dist/logger/Logger.js.map +0 -1
  263. package/node_modules/@azure/msal-common/dist/network/INetworkModule.d.ts +0 -30
  264. package/node_modules/@azure/msal-common/dist/network/INetworkModule.d.ts.map +0 -1
  265. package/node_modules/@azure/msal-common/dist/network/INetworkModule.js +0 -21
  266. package/node_modules/@azure/msal-common/dist/network/INetworkModule.js.map +0 -1
  267. package/node_modules/@azure/msal-common/dist/network/NetworkManager.d.ts +0 -33
  268. package/node_modules/@azure/msal-common/dist/network/NetworkManager.d.ts.map +0 -1
  269. package/node_modules/@azure/msal-common/dist/network/NetworkManager.js +0 -42
  270. package/node_modules/@azure/msal-common/dist/network/NetworkManager.js.map +0 -1
  271. package/node_modules/@azure/msal-common/dist/network/RequestThumbprint.d.ts +0 -17
  272. package/node_modules/@azure/msal-common/dist/network/RequestThumbprint.d.ts.map +0 -1
  273. package/node_modules/@azure/msal-common/dist/network/ThrottlingUtils.d.ts +0 -42
  274. package/node_modules/@azure/msal-common/dist/network/ThrottlingUtils.d.ts.map +0 -1
  275. package/node_modules/@azure/msal-common/dist/network/ThrottlingUtils.js +0 -102
  276. package/node_modules/@azure/msal-common/dist/network/ThrottlingUtils.js.map +0 -1
  277. package/node_modules/@azure/msal-common/dist/packageMetadata.d.ts +0 -3
  278. package/node_modules/@azure/msal-common/dist/packageMetadata.d.ts.map +0 -1
  279. package/node_modules/@azure/msal-common/dist/packageMetadata.js +0 -8
  280. package/node_modules/@azure/msal-common/dist/packageMetadata.js.map +0 -1
  281. package/node_modules/@azure/msal-common/dist/request/AuthenticationHeaderParser.d.ts +0 -20
  282. package/node_modules/@azure/msal-common/dist/request/AuthenticationHeaderParser.d.ts.map +0 -1
  283. package/node_modules/@azure/msal-common/dist/request/AuthenticationHeaderParser.js +0 -63
  284. package/node_modules/@azure/msal-common/dist/request/AuthenticationHeaderParser.js.map +0 -1
  285. package/node_modules/@azure/msal-common/dist/request/BaseAuthRequest.d.ts +0 -38
  286. package/node_modules/@azure/msal-common/dist/request/BaseAuthRequest.d.ts.map +0 -1
  287. package/node_modules/@azure/msal-common/dist/request/CommonAuthorizationCodeRequest.d.ts +0 -28
  288. package/node_modules/@azure/msal-common/dist/request/CommonAuthorizationCodeRequest.d.ts.map +0 -1
  289. package/node_modules/@azure/msal-common/dist/request/CommonAuthorizationUrlRequest.d.ts +0 -51
  290. package/node_modules/@azure/msal-common/dist/request/CommonAuthorizationUrlRequest.d.ts.map +0 -1
  291. package/node_modules/@azure/msal-common/dist/request/CommonClientCredentialRequest.d.ts +0 -18
  292. package/node_modules/@azure/msal-common/dist/request/CommonClientCredentialRequest.d.ts.map +0 -1
  293. package/node_modules/@azure/msal-common/dist/request/CommonDeviceCodeRequest.d.ts +0 -22
  294. package/node_modules/@azure/msal-common/dist/request/CommonDeviceCodeRequest.d.ts.map +0 -1
  295. package/node_modules/@azure/msal-common/dist/request/CommonEndSessionRequest.d.ts +0 -22
  296. package/node_modules/@azure/msal-common/dist/request/CommonEndSessionRequest.d.ts.map +0 -1
  297. package/node_modules/@azure/msal-common/dist/request/CommonOnBehalfOfRequest.d.ts +0 -14
  298. package/node_modules/@azure/msal-common/dist/request/CommonOnBehalfOfRequest.d.ts.map +0 -1
  299. package/node_modules/@azure/msal-common/dist/request/CommonRefreshTokenRequest.d.ts +0 -20
  300. package/node_modules/@azure/msal-common/dist/request/CommonRefreshTokenRequest.d.ts.map +0 -1
  301. package/node_modules/@azure/msal-common/dist/request/CommonSilentFlowRequest.d.ts +0 -19
  302. package/node_modules/@azure/msal-common/dist/request/CommonSilentFlowRequest.d.ts.map +0 -1
  303. package/node_modules/@azure/msal-common/dist/request/CommonUsernamePasswordRequest.d.ts +0 -18
  304. package/node_modules/@azure/msal-common/dist/request/CommonUsernamePasswordRequest.d.ts.map +0 -1
  305. package/node_modules/@azure/msal-common/dist/request/NativeRequest.d.ts +0 -20
  306. package/node_modules/@azure/msal-common/dist/request/NativeRequest.d.ts.map +0 -1
  307. package/node_modules/@azure/msal-common/dist/request/NativeSignOutRequest.d.ts +0 -6
  308. package/node_modules/@azure/msal-common/dist/request/NativeSignOutRequest.d.ts.map +0 -1
  309. package/node_modules/@azure/msal-common/dist/request/RequestParameterBuilder.d.ts +0 -217
  310. package/node_modules/@azure/msal-common/dist/request/RequestParameterBuilder.d.ts.map +0 -1
  311. package/node_modules/@azure/msal-common/dist/request/RequestParameterBuilder.js +0 -385
  312. package/node_modules/@azure/msal-common/dist/request/RequestParameterBuilder.js.map +0 -1
  313. package/node_modules/@azure/msal-common/dist/request/RequestValidator.d.ts +0 -34
  314. package/node_modules/@azure/msal-common/dist/request/RequestValidator.d.ts.map +0 -1
  315. package/node_modules/@azure/msal-common/dist/request/RequestValidator.js +0 -92
  316. package/node_modules/@azure/msal-common/dist/request/RequestValidator.js.map +0 -1
  317. package/node_modules/@azure/msal-common/dist/request/ScopeSet.d.ts +0 -89
  318. package/node_modules/@azure/msal-common/dist/request/ScopeSet.d.ts.map +0 -1
  319. package/node_modules/@azure/msal-common/dist/request/ScopeSet.js +0 -207
  320. package/node_modules/@azure/msal-common/dist/request/ScopeSet.js.map +0 -1
  321. package/node_modules/@azure/msal-common/dist/response/AuthenticationResult.d.ts +0 -40
  322. package/node_modules/@azure/msal-common/dist/response/AuthenticationResult.d.ts.map +0 -1
  323. package/node_modules/@azure/msal-common/dist/response/AuthorizationCodePayload.d.ts +0 -14
  324. package/node_modules/@azure/msal-common/dist/response/AuthorizationCodePayload.d.ts.map +0 -1
  325. package/node_modules/@azure/msal-common/dist/response/DeviceCodeResponse.d.ts +0 -26
  326. package/node_modules/@azure/msal-common/dist/response/DeviceCodeResponse.d.ts.map +0 -1
  327. package/node_modules/@azure/msal-common/dist/response/ExternalTokenResponse.d.ts +0 -16
  328. package/node_modules/@azure/msal-common/dist/response/ExternalTokenResponse.d.ts.map +0 -1
  329. package/node_modules/@azure/msal-common/dist/response/IMDSBadResponse.d.ts +0 -5
  330. package/node_modules/@azure/msal-common/dist/response/IMDSBadResponse.d.ts.map +0 -1
  331. package/node_modules/@azure/msal-common/dist/response/ResponseHandler.d.ts +0 -73
  332. package/node_modules/@azure/msal-common/dist/response/ResponseHandler.d.ts.map +0 -1
  333. package/node_modules/@azure/msal-common/dist/response/ResponseHandler.js +0 -325
  334. package/node_modules/@azure/msal-common/dist/response/ResponseHandler.js.map +0 -1
  335. package/node_modules/@azure/msal-common/dist/response/ServerAuthorizationCodeResponse.d.ts +0 -26
  336. package/node_modules/@azure/msal-common/dist/response/ServerAuthorizationCodeResponse.d.ts.map +0 -1
  337. package/node_modules/@azure/msal-common/dist/response/ServerAuthorizationTokenResponse.d.ts +0 -45
  338. package/node_modules/@azure/msal-common/dist/response/ServerAuthorizationTokenResponse.d.ts.map +0 -1
  339. package/node_modules/@azure/msal-common/dist/telemetry/performance/IPerformanceClient.d.ts +0 -43
  340. package/node_modules/@azure/msal-common/dist/telemetry/performance/IPerformanceClient.d.ts.map +0 -1
  341. package/node_modules/@azure/msal-common/dist/telemetry/performance/IPerformanceMeasurement.d.ts +0 -6
  342. package/node_modules/@azure/msal-common/dist/telemetry/performance/IPerformanceMeasurement.d.ts.map +0 -1
  343. package/node_modules/@azure/msal-common/dist/telemetry/performance/PerformanceClient.d.ts +0 -190
  344. package/node_modules/@azure/msal-common/dist/telemetry/performance/PerformanceClient.d.ts.map +0 -1
  345. package/node_modules/@azure/msal-common/dist/telemetry/performance/PerformanceClient.js +0 -413
  346. package/node_modules/@azure/msal-common/dist/telemetry/performance/PerformanceClient.js.map +0 -1
  347. package/node_modules/@azure/msal-common/dist/telemetry/performance/PerformanceEvent.d.ts +0 -440
  348. package/node_modules/@azure/msal-common/dist/telemetry/performance/PerformanceEvent.d.ts.map +0 -1
  349. package/node_modules/@azure/msal-common/dist/telemetry/performance/PerformanceEvent.js +0 -232
  350. package/node_modules/@azure/msal-common/dist/telemetry/performance/PerformanceEvent.js.map +0 -1
  351. package/node_modules/@azure/msal-common/dist/telemetry/performance/StubPerformanceClient.d.ts +0 -20
  352. package/node_modules/@azure/msal-common/dist/telemetry/performance/StubPerformanceClient.d.ts.map +0 -1
  353. package/node_modules/@azure/msal-common/dist/telemetry/performance/StubPerformanceClient.js +0 -43
  354. package/node_modules/@azure/msal-common/dist/telemetry/performance/StubPerformanceClient.js.map +0 -1
  355. package/node_modules/@azure/msal-common/dist/telemetry/server/ServerTelemetryManager.d.ts +0 -66
  356. package/node_modules/@azure/msal-common/dist/telemetry/server/ServerTelemetryManager.d.ts.map +0 -1
  357. package/node_modules/@azure/msal-common/dist/telemetry/server/ServerTelemetryManager.js +0 -206
  358. package/node_modules/@azure/msal-common/dist/telemetry/server/ServerTelemetryManager.js.map +0 -1
  359. package/node_modules/@azure/msal-common/dist/telemetry/server/ServerTelemetryRequest.d.ts +0 -9
  360. package/node_modules/@azure/msal-common/dist/telemetry/server/ServerTelemetryRequest.d.ts.map +0 -1
  361. package/node_modules/@azure/msal-common/dist/url/IUri.d.ts +0 -13
  362. package/node_modules/@azure/msal-common/dist/url/IUri.d.ts.map +0 -1
  363. package/node_modules/@azure/msal-common/dist/url/UrlString.d.ts +0 -71
  364. package/node_modules/@azure/msal-common/dist/url/UrlString.d.ts.map +0 -1
  365. package/node_modules/@azure/msal-common/dist/url/UrlString.js +0 -252
  366. package/node_modules/@azure/msal-common/dist/url/UrlString.js.map +0 -1
  367. package/node_modules/@azure/msal-common/dist/utils/Constants.d.ts +0 -332
  368. package/node_modules/@azure/msal-common/dist/utils/Constants.d.ts.map +0 -1
  369. package/node_modules/@azure/msal-common/dist/utils/Constants.js +0 -378
  370. package/node_modules/@azure/msal-common/dist/utils/Constants.js.map +0 -1
  371. package/node_modules/@azure/msal-common/dist/utils/MsalTypes.d.ts +0 -7
  372. package/node_modules/@azure/msal-common/dist/utils/MsalTypes.d.ts.map +0 -1
  373. package/node_modules/@azure/msal-common/dist/utils/ProtocolUtils.d.ts +0 -43
  374. package/node_modules/@azure/msal-common/dist/utils/ProtocolUtils.d.ts.map +0 -1
  375. package/node_modules/@azure/msal-common/dist/utils/ProtocolUtils.js +0 -80
  376. package/node_modules/@azure/msal-common/dist/utils/ProtocolUtils.js.map +0 -1
  377. package/node_modules/@azure/msal-common/dist/utils/StringUtils.d.ts +0 -54
  378. package/node_modules/@azure/msal-common/dist/utils/StringUtils.d.ts.map +0 -1
  379. package/node_modules/@azure/msal-common/dist/utils/StringUtils.js +0 -131
  380. package/node_modules/@azure/msal-common/dist/utils/StringUtils.js.map +0 -1
  381. package/node_modules/@azure/msal-common/dist/utils/TimeUtils.d.ts +0 -28
  382. package/node_modules/@azure/msal-common/dist/utils/TimeUtils.d.ts.map +0 -1
  383. package/node_modules/@azure/msal-common/dist/utils/TimeUtils.js +0 -50
  384. package/node_modules/@azure/msal-common/dist/utils/TimeUtils.js.map +0 -1
  385. package/node_modules/@azure/msal-common/package.json +0 -79
@@ -1,688 +0,0 @@
1
- /*! @azure/msal-common v14.0.0 2023-05-03 */
2
- 'use strict';
3
- import { AuthorityType } from './AuthorityType.js';
4
- import { isOpenIdConfigResponse } from './OpenIdConfigResponse.js';
5
- import { UrlString } from '../url/UrlString.js';
6
- import { ClientAuthError } from '../error/ClientAuthError.js';
7
- import { Constants, AuthorityMetadataSource, RegionDiscoveryOutcomes } from '../utils/Constants.js';
8
- import { EndpointMetadata, InstanceDiscoveryMetadata } from './AuthorityMetadata.js';
9
- import { ClientConfigurationError } from '../error/ClientConfigurationError.js';
10
- import { ProtocolMode } from './ProtocolMode.js';
11
- import { AuthorityMetadataEntity } from '../cache/entities/AuthorityMetadataEntity.js';
12
- import { AzureCloudInstance } from './AuthorityOptions.js';
13
- import { isCloudInstanceDiscoveryResponse } from './CloudInstanceDiscoveryResponse.js';
14
- import { isCloudInstanceDiscoveryErrorResponse } from './CloudInstanceDiscoveryErrorResponse.js';
15
- import { RegionDiscovery } from './RegionDiscovery.js';
16
- import { AuthError } from '../error/AuthError.js';
17
- import { PerformanceEvents } from '../telemetry/performance/PerformanceEvent.js';
18
-
19
- /*
20
- * Copyright (c) Microsoft Corporation. All rights reserved.
21
- * Licensed under the MIT License.
22
- */
23
- /**
24
- * The authority class validates the authority URIs used by the user, and retrieves the OpenID Configuration Data from the
25
- * endpoint. It will store the pertinent config data in this object for use during token calls.
26
- */
27
- class Authority {
28
- constructor(authority, networkInterface, cacheManager, authorityOptions, logger, performanceClient, correlationId) {
29
- this.canonicalAuthority = authority;
30
- this._canonicalAuthority.validateAsUri();
31
- this.networkInterface = networkInterface;
32
- this.cacheManager = cacheManager;
33
- this.authorityOptions = authorityOptions;
34
- this.regionDiscoveryMetadata = {
35
- region_used: undefined,
36
- region_source: undefined,
37
- region_outcome: undefined,
38
- };
39
- this.logger = logger;
40
- this.performanceClient = performanceClient;
41
- this.correlationId = correlationId;
42
- this.regionDiscovery = new RegionDiscovery(networkInterface, this.performanceClient, this.correlationId);
43
- }
44
- // See above for AuthorityType
45
- get authorityType() {
46
- const pathSegments = this.canonicalAuthorityUrlComponents.PathSegments;
47
- // CIAM auth url pattern is being standardized as: <tenant>.ciamlogin.com
48
- if (this.canonicalAuthorityUrlComponents.HostNameAndPort.endsWith(Constants.CIAM_AUTH_URL)) {
49
- return AuthorityType.Ciam;
50
- }
51
- if (pathSegments.length) {
52
- switch (pathSegments[0].toLowerCase()) {
53
- case Constants.ADFS:
54
- return AuthorityType.Adfs;
55
- case Constants.DSTS:
56
- return AuthorityType.Dsts;
57
- }
58
- }
59
- return AuthorityType.Default;
60
- }
61
- /**
62
- * ProtocolMode enum representing the way endpoints are constructed.
63
- */
64
- get protocolMode() {
65
- return this.authorityOptions.protocolMode;
66
- }
67
- /**
68
- * Returns authorityOptions which can be used to reinstantiate a new authority instance
69
- */
70
- get options() {
71
- return this.authorityOptions;
72
- }
73
- /**
74
- * A URL that is the authority set by the developer
75
- */
76
- get canonicalAuthority() {
77
- return this._canonicalAuthority.urlString;
78
- }
79
- /**
80
- * Sets canonical authority.
81
- */
82
- set canonicalAuthority(url) {
83
- this._canonicalAuthority = new UrlString(url);
84
- this._canonicalAuthority.validateAsUri();
85
- this._canonicalAuthorityUrlComponents = null;
86
- }
87
- /**
88
- * Get authority components.
89
- */
90
- get canonicalAuthorityUrlComponents() {
91
- if (!this._canonicalAuthorityUrlComponents) {
92
- this._canonicalAuthorityUrlComponents =
93
- this._canonicalAuthority.getUrlComponents();
94
- }
95
- return this._canonicalAuthorityUrlComponents;
96
- }
97
- /**
98
- * Get hostname and port i.e. login.microsoftonline.com
99
- */
100
- get hostnameAndPort() {
101
- return this.canonicalAuthorityUrlComponents.HostNameAndPort.toLowerCase();
102
- }
103
- /**
104
- * Get tenant for authority.
105
- */
106
- get tenant() {
107
- return this.canonicalAuthorityUrlComponents.PathSegments[0];
108
- }
109
- /**
110
- * OAuth /authorize endpoint for requests
111
- */
112
- get authorizationEndpoint() {
113
- if (this.discoveryComplete()) {
114
- const endpoint = this.replacePath(this.metadata.authorization_endpoint);
115
- return this.replaceTenant(endpoint);
116
- }
117
- else {
118
- throw ClientAuthError.createEndpointDiscoveryIncompleteError("Discovery incomplete.");
119
- }
120
- }
121
- /**
122
- * OAuth /token endpoint for requests
123
- */
124
- get tokenEndpoint() {
125
- if (this.discoveryComplete()) {
126
- const endpoint = this.replacePath(this.metadata.token_endpoint);
127
- return this.replaceTenant(endpoint);
128
- }
129
- else {
130
- throw ClientAuthError.createEndpointDiscoveryIncompleteError("Discovery incomplete.");
131
- }
132
- }
133
- get deviceCodeEndpoint() {
134
- if (this.discoveryComplete()) {
135
- const endpoint = this.replacePath(this.metadata.token_endpoint.replace("/token", "/devicecode"));
136
- return this.replaceTenant(endpoint);
137
- }
138
- else {
139
- throw ClientAuthError.createEndpointDiscoveryIncompleteError("Discovery incomplete.");
140
- }
141
- }
142
- /**
143
- * OAuth logout endpoint for requests
144
- */
145
- get endSessionEndpoint() {
146
- if (this.discoveryComplete()) {
147
- // ROPC policies may not have end_session_endpoint set
148
- if (!this.metadata.end_session_endpoint) {
149
- throw ClientAuthError.createLogoutNotSupportedError();
150
- }
151
- const endpoint = this.replacePath(this.metadata.end_session_endpoint);
152
- return this.replaceTenant(endpoint);
153
- }
154
- else {
155
- throw ClientAuthError.createEndpointDiscoveryIncompleteError("Discovery incomplete.");
156
- }
157
- }
158
- /**
159
- * OAuth issuer for requests
160
- */
161
- get selfSignedJwtAudience() {
162
- if (this.discoveryComplete()) {
163
- const endpoint = this.replacePath(this.metadata.issuer);
164
- return this.replaceTenant(endpoint);
165
- }
166
- else {
167
- throw ClientAuthError.createEndpointDiscoveryIncompleteError("Discovery incomplete.");
168
- }
169
- }
170
- /**
171
- * Jwks_uri for token signing keys
172
- */
173
- get jwksUri() {
174
- if (this.discoveryComplete()) {
175
- const endpoint = this.replacePath(this.metadata.jwks_uri);
176
- return this.replaceTenant(endpoint);
177
- }
178
- else {
179
- throw ClientAuthError.createEndpointDiscoveryIncompleteError("Discovery incomplete.");
180
- }
181
- }
182
- /**
183
- * Replaces tenant in url path with current tenant. Defaults to common.
184
- * @param urlString
185
- */
186
- replaceTenant(urlString) {
187
- return urlString.replace(/{tenant}|{tenantid}/g, this.tenant);
188
- }
189
- /**
190
- * Replaces path such as tenant or policy with the current tenant or policy.
191
- * @param urlString
192
- */
193
- replacePath(urlString) {
194
- let endpoint = urlString;
195
- const cachedAuthorityUrl = new UrlString(this.metadata.canonical_authority);
196
- const cachedAuthorityParts = cachedAuthorityUrl.getUrlComponents().PathSegments;
197
- const currentAuthorityParts = this.canonicalAuthorityUrlComponents.PathSegments;
198
- currentAuthorityParts.forEach((currentPart, index) => {
199
- const cachedPart = cachedAuthorityParts[index];
200
- if (currentPart !== cachedPart) {
201
- endpoint = endpoint.replace(`/${cachedPart}/`, `/${currentPart}/`);
202
- }
203
- });
204
- return endpoint;
205
- }
206
- /**
207
- * The default open id configuration endpoint for any canonical authority.
208
- */
209
- get defaultOpenIdConfigurationEndpoint() {
210
- if (this.authorityType === AuthorityType.Adfs ||
211
- this.protocolMode === ProtocolMode.OIDC) {
212
- return `${this.canonicalAuthority}.well-known/openid-configuration`;
213
- }
214
- return `${this.canonicalAuthority}v2.0/.well-known/openid-configuration`;
215
- }
216
- /**
217
- * Boolean that returns whethr or not tenant discovery has been completed.
218
- */
219
- discoveryComplete() {
220
- return !!this.metadata;
221
- }
222
- /**
223
- * Perform endpoint discovery to discover aliases, preferred_cache, preferred_network
224
- * and the /authorize, /token and logout endpoints.
225
- */
226
- async resolveEndpointsAsync() {
227
- this.performanceClient?.addQueueMeasurement(PerformanceEvents.AuthorityResolveEndpointsAsync, this.correlationId);
228
- let metadataEntity = this.cacheManager.getAuthorityMetadataByAlias(this.hostnameAndPort);
229
- if (!metadataEntity) {
230
- metadataEntity = new AuthorityMetadataEntity();
231
- metadataEntity.updateCanonicalAuthority(this.canonicalAuthority);
232
- }
233
- this.performanceClient?.setPreQueueTime(PerformanceEvents.AuthorityUpdateCloudDiscoveryMetadata, this.correlationId);
234
- const cloudDiscoverySource = await this.updateCloudDiscoveryMetadata(metadataEntity);
235
- this.canonicalAuthority = this.canonicalAuthority.replace(this.hostnameAndPort, metadataEntity.preferred_network);
236
- this.performanceClient?.setPreQueueTime(PerformanceEvents.AuthorityUpdateEndpointMetadata, this.correlationId);
237
- const endpointSource = await this.updateEndpointMetadata(metadataEntity);
238
- if (cloudDiscoverySource !== AuthorityMetadataSource.CACHE &&
239
- endpointSource !== AuthorityMetadataSource.CACHE) {
240
- // Reset the expiration time unless both values came from a successful cache lookup
241
- metadataEntity.resetExpiresAt();
242
- metadataEntity.updateCanonicalAuthority(this.canonicalAuthority);
243
- }
244
- const cacheKey = this.cacheManager.generateAuthorityMetadataCacheKey(metadataEntity.preferred_cache);
245
- this.cacheManager.setAuthorityMetadata(cacheKey, metadataEntity);
246
- this.metadata = metadataEntity;
247
- }
248
- /**
249
- * Update AuthorityMetadataEntity with new endpoints and return where the information came from
250
- * @param metadataEntity
251
- */
252
- async updateEndpointMetadata(metadataEntity) {
253
- this.performanceClient?.addQueueMeasurement(PerformanceEvents.AuthorityUpdateEndpointMetadata, this.correlationId);
254
- let metadata = this.getEndpointMetadataFromConfig();
255
- if (metadata) {
256
- metadataEntity.updateEndpointMetadata(metadata, false);
257
- return AuthorityMetadataSource.CONFIG;
258
- }
259
- if (this.isAuthoritySameType(metadataEntity) &&
260
- metadataEntity.endpointsFromNetwork &&
261
- !metadataEntity.isExpired()) {
262
- // No need to update
263
- return AuthorityMetadataSource.CACHE;
264
- }
265
- this.performanceClient?.setPreQueueTime(PerformanceEvents.AuthorityGetEndpointMetadataFromNetwork, this.correlationId);
266
- metadata = await this.getEndpointMetadataFromNetwork();
267
- if (metadata) {
268
- // If the user prefers to use an azure region replace the global endpoints with regional information.
269
- if (this.authorityOptions.azureRegionConfiguration?.azureRegion) {
270
- this.performanceClient?.setPreQueueTime(PerformanceEvents.AuthorityUpdateMetadataWithRegionalInformation, this.correlationId);
271
- metadata = await this.updateMetadataWithRegionalInformation(metadata);
272
- }
273
- metadataEntity.updateEndpointMetadata(metadata, true);
274
- return AuthorityMetadataSource.NETWORK;
275
- }
276
- let harcodedMetadata = this.getEndpointMetadataFromHardcodedValues();
277
- if (harcodedMetadata &&
278
- !this.authorityOptions.skipAuthorityMetadataCache) {
279
- // If the user prefers to use an azure region replace the global endpoints with regional information.
280
- if (this.authorityOptions.azureRegionConfiguration?.azureRegion) {
281
- this.performanceClient?.setPreQueueTime(PerformanceEvents.AuthorityUpdateMetadataWithRegionalInformation, this.correlationId);
282
- harcodedMetadata =
283
- await this.updateMetadataWithRegionalInformation(harcodedMetadata);
284
- }
285
- metadataEntity.updateEndpointMetadata(harcodedMetadata, false);
286
- return AuthorityMetadataSource.HARDCODED_VALUES;
287
- }
288
- else {
289
- throw ClientAuthError.createUnableToGetOpenidConfigError(this.defaultOpenIdConfigurationEndpoint);
290
- }
291
- }
292
- /**
293
- * Compares the number of url components after the domain to determine if the cached
294
- * authority metadata can be used for the requested authority. Protects against same domain different
295
- * authority such as login.microsoftonline.com/tenant and login.microsoftonline.com/tfp/tenant/policy
296
- * @param metadataEntity
297
- */
298
- isAuthoritySameType(metadataEntity) {
299
- const cachedAuthorityUrl = new UrlString(metadataEntity.canonical_authority);
300
- const cachedParts = cachedAuthorityUrl.getUrlComponents().PathSegments;
301
- return (cachedParts.length ===
302
- this.canonicalAuthorityUrlComponents.PathSegments.length);
303
- }
304
- /**
305
- * Parse authorityMetadata config option
306
- */
307
- getEndpointMetadataFromConfig() {
308
- if (this.authorityOptions.authorityMetadata) {
309
- try {
310
- return JSON.parse(this.authorityOptions.authorityMetadata);
311
- }
312
- catch (e) {
313
- throw ClientConfigurationError.createInvalidAuthorityMetadataError();
314
- }
315
- }
316
- return null;
317
- }
318
- /**
319
- * Gets OAuth endpoints from the given OpenID configuration endpoint.
320
- *
321
- * @param hasHardcodedMetadata boolean
322
- */
323
- async getEndpointMetadataFromNetwork() {
324
- this.performanceClient?.addQueueMeasurement(PerformanceEvents.AuthorityGetEndpointMetadataFromNetwork, this.correlationId);
325
- const options = {};
326
- /*
327
- * TODO: Add a timeout if the authority exists in our library's
328
- * hardcoded list of metadata
329
- */
330
- try {
331
- const response = await this.networkInterface.sendGetRequestAsync(this.defaultOpenIdConfigurationEndpoint, options);
332
- return isOpenIdConfigResponse(response.body) ? response.body : null;
333
- }
334
- catch (e) {
335
- return null;
336
- }
337
- }
338
- /**
339
- * Get OAuth endpoints for common authorities.
340
- */
341
- getEndpointMetadataFromHardcodedValues() {
342
- if (this.canonicalAuthority in EndpointMetadata) {
343
- return EndpointMetadata[this.canonicalAuthority];
344
- }
345
- return null;
346
- }
347
- /**
348
- * Update the retrieved metadata with regional information.
349
- */
350
- async updateMetadataWithRegionalInformation(metadata) {
351
- this.performanceClient?.addQueueMeasurement(PerformanceEvents.AuthorityUpdateMetadataWithRegionalInformation, this.correlationId);
352
- this.performanceClient?.setPreQueueTime(PerformanceEvents.RegionDiscoveryDetectRegion, this.correlationId);
353
- const autodetectedRegionName = await this.regionDiscovery.detectRegion(this.authorityOptions.azureRegionConfiguration?.environmentRegion, this.regionDiscoveryMetadata);
354
- const azureRegion = this.authorityOptions.azureRegionConfiguration?.azureRegion ===
355
- Constants.AZURE_REGION_AUTO_DISCOVER_FLAG
356
- ? autodetectedRegionName
357
- : this.authorityOptions.azureRegionConfiguration?.azureRegion;
358
- if (this.authorityOptions.azureRegionConfiguration?.azureRegion ===
359
- Constants.AZURE_REGION_AUTO_DISCOVER_FLAG) {
360
- this.regionDiscoveryMetadata.region_outcome = autodetectedRegionName
361
- ? RegionDiscoveryOutcomes.AUTO_DETECTION_REQUESTED_SUCCESSFUL
362
- : RegionDiscoveryOutcomes.AUTO_DETECTION_REQUESTED_FAILED;
363
- }
364
- else {
365
- if (autodetectedRegionName) {
366
- this.regionDiscoveryMetadata.region_outcome =
367
- this.authorityOptions.azureRegionConfiguration
368
- ?.azureRegion === autodetectedRegionName
369
- ? RegionDiscoveryOutcomes.CONFIGURED_MATCHES_DETECTED
370
- : RegionDiscoveryOutcomes.CONFIGURED_NOT_DETECTED;
371
- }
372
- else {
373
- this.regionDiscoveryMetadata.region_outcome =
374
- RegionDiscoveryOutcomes.CONFIGURED_NO_AUTO_DETECTION;
375
- }
376
- }
377
- if (azureRegion) {
378
- this.regionDiscoveryMetadata.region_used = azureRegion;
379
- return Authority.replaceWithRegionalInformation(metadata, azureRegion);
380
- }
381
- return metadata;
382
- }
383
- /**
384
- * Updates the AuthorityMetadataEntity with new aliases, preferred_network and preferred_cache
385
- * and returns where the information was retrieved from
386
- * @param metadataEntity
387
- * @returns AuthorityMetadataSource
388
- */
389
- async updateCloudDiscoveryMetadata(metadataEntity) {
390
- this.performanceClient?.addQueueMeasurement(PerformanceEvents.AuthorityUpdateCloudDiscoveryMetadata, this.correlationId);
391
- this.logger.verbose("Attempting to get cloud discovery metadata in the config");
392
- this.logger.verbosePii(`Known Authorities: ${this.authorityOptions.knownAuthorities ||
393
- Constants.NOT_APPLICABLE}`);
394
- this.logger.verbosePii(`Authority Metadata: ${this.authorityOptions.authorityMetadata ||
395
- Constants.NOT_APPLICABLE}`);
396
- this.logger.verbosePii(`Canonical Authority: ${metadataEntity.canonical_authority || Constants.NOT_APPLICABLE}`);
397
- let metadata = this.getCloudDiscoveryMetadataFromConfig();
398
- if (metadata) {
399
- this.logger.verbose("Found cloud discovery metadata in the config.");
400
- metadataEntity.updateCloudDiscoveryMetadata(metadata, false);
401
- return AuthorityMetadataSource.CONFIG;
402
- }
403
- // If the cached metadata came from config but that config was not passed to this instance, we must go to the network
404
- this.logger.verbose("Did not find cloud discovery metadata in the config... Attempting to get cloud discovery metadata from the cache.");
405
- const metadataEntityExpired = metadataEntity.isExpired();
406
- if (this.isAuthoritySameType(metadataEntity) &&
407
- metadataEntity.aliasesFromNetwork &&
408
- !metadataEntityExpired) {
409
- this.logger.verbose("Found metadata in the cache.");
410
- // No need to update
411
- return AuthorityMetadataSource.CACHE;
412
- }
413
- else if (metadataEntityExpired) {
414
- this.logger.verbose("The metadata entity is expired.");
415
- }
416
- this.logger.verbose("Did not find cloud discovery metadata in the cache... Attempting to get cloud discovery metadata from the network.");
417
- this.performanceClient?.setPreQueueTime(PerformanceEvents.AuthorityGetCloudDiscoveryMetadataFromNetwork, this.correlationId);
418
- metadata = await this.getCloudDiscoveryMetadataFromNetwork();
419
- if (metadata) {
420
- this.logger.verbose("cloud discovery metadata was successfully returned from getCloudDiscoveryMetadataFromNetwork()");
421
- metadataEntity.updateCloudDiscoveryMetadata(metadata, true);
422
- return AuthorityMetadataSource.NETWORK;
423
- }
424
- this.logger.verbose("Did not find cloud discovery metadata from the network... Attempting to get cloud discovery metadata from hardcoded values.");
425
- const harcodedMetadata = this.getCloudDiscoveryMetadataFromHarcodedValues();
426
- if (harcodedMetadata && !this.options.skipAuthorityMetadataCache) {
427
- this.logger.verbose("Found cloud discovery metadata from hardcoded values.");
428
- metadataEntity.updateCloudDiscoveryMetadata(harcodedMetadata, false);
429
- return AuthorityMetadataSource.HARDCODED_VALUES;
430
- }
431
- // Metadata could not be obtained from the config, cache, network or hardcoded values
432
- this.logger.error("Did not find cloud discovery metadata from hardcoded values... Metadata could not be obtained from config, cache, network or hardcoded values. Throwing Untrusted Authority Error.");
433
- throw ClientConfigurationError.createUntrustedAuthorityError();
434
- }
435
- /**
436
- * Parse cloudDiscoveryMetadata config or check knownAuthorities
437
- */
438
- getCloudDiscoveryMetadataFromConfig() {
439
- // CIAM does not support cloud discovery metadata
440
- if (this.authorityType === AuthorityType.Ciam) {
441
- this.logger.verbose("CIAM authorities do not support cloud discovery metadata, generate the aliases from authority host.");
442
- return Authority.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort);
443
- }
444
- // Check if network response was provided in config
445
- if (this.authorityOptions.cloudDiscoveryMetadata) {
446
- this.logger.verbose("The cloud discovery metadata has been provided as a network response, in the config.");
447
- try {
448
- this.logger.verbose("Attempting to parse the cloud discovery metadata.");
449
- const parsedResponse = JSON.parse(this.authorityOptions.cloudDiscoveryMetadata);
450
- const metadata = Authority.getCloudDiscoveryMetadataFromNetworkResponse(parsedResponse.metadata, this.hostnameAndPort);
451
- this.logger.verbose("Parsed the cloud discovery metadata.");
452
- if (metadata) {
453
- this.logger.verbose("There is returnable metadata attached to the parsed cloud discovery metadata.");
454
- return metadata;
455
- }
456
- else {
457
- this.logger.verbose("There is no metadata attached to the parsed cloud discovery metadata.");
458
- }
459
- }
460
- catch (e) {
461
- this.logger.verbose("Unable to parse the cloud discovery metadata. Throwing Invalid Cloud Discovery Metadata Error.");
462
- throw ClientConfigurationError.createInvalidCloudDiscoveryMetadataError();
463
- }
464
- }
465
- // If cloudDiscoveryMetadata is empty or does not contain the host, check knownAuthorities
466
- if (this.isInKnownAuthorities()) {
467
- this.logger.verbose("The host is included in knownAuthorities. Creating new cloud discovery metadata from the host.");
468
- return Authority.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort);
469
- }
470
- return null;
471
- }
472
- /**
473
- * Called to get metadata from network if CloudDiscoveryMetadata was not populated by config
474
- *
475
- * @param hasHardcodedMetadata boolean
476
- */
477
- async getCloudDiscoveryMetadataFromNetwork() {
478
- this.performanceClient?.addQueueMeasurement(PerformanceEvents.AuthorityGetCloudDiscoveryMetadataFromNetwork, this.correlationId);
479
- const instanceDiscoveryEndpoint = `${Constants.AAD_INSTANCE_DISCOVERY_ENDPT}${this.canonicalAuthority}oauth2/v2.0/authorize`;
480
- const options = {};
481
- /*
482
- * TODO: Add a timeout if the authority exists in our library's
483
- * hardcoded list of metadata
484
- */
485
- let match = null;
486
- try {
487
- const response = await this.networkInterface.sendGetRequestAsync(instanceDiscoveryEndpoint, options);
488
- let typedResponseBody;
489
- let metadata;
490
- if (isCloudInstanceDiscoveryResponse(response.body)) {
491
- typedResponseBody =
492
- response.body;
493
- metadata = typedResponseBody.metadata;
494
- this.logger.verbosePii(`tenant_discovery_endpoint is: ${typedResponseBody.tenant_discovery_endpoint}`);
495
- }
496
- else if (isCloudInstanceDiscoveryErrorResponse(response.body)) {
497
- this.logger.warning(`A CloudInstanceDiscoveryErrorResponse was returned. The cloud instance discovery network request's status code is: ${response.status}`);
498
- typedResponseBody =
499
- response.body;
500
- if (typedResponseBody.error === Constants.INVALID_INSTANCE) {
501
- this.logger.error("The CloudInstanceDiscoveryErrorResponse error is invalid_instance.");
502
- return null;
503
- }
504
- this.logger.warning(`The CloudInstanceDiscoveryErrorResponse error is ${typedResponseBody.error}`);
505
- this.logger.warning(`The CloudInstanceDiscoveryErrorResponse error description is ${typedResponseBody.error_description}`);
506
- this.logger.warning("Setting the value of the CloudInstanceDiscoveryMetadata (returned from the network) to []");
507
- metadata = [];
508
- }
509
- else {
510
- this.logger.error("AAD did not return a CloudInstanceDiscoveryResponse or CloudInstanceDiscoveryErrorResponse");
511
- return null;
512
- }
513
- this.logger.verbose("Attempting to find a match between the developer's authority and the CloudInstanceDiscoveryMetadata returned from the network request.");
514
- match = Authority.getCloudDiscoveryMetadataFromNetworkResponse(metadata, this.hostnameAndPort);
515
- }
516
- catch (error) {
517
- if (error instanceof AuthError) {
518
- this.logger.error(`There was a network error while attempting to get the cloud discovery instance metadata.\nError: ${error.errorCode}\nError Description: ${error.errorMessage}`);
519
- }
520
- else {
521
- const typedError = error;
522
- this.logger.error(`A non-MSALJS error was thrown while attempting to get the cloud instance discovery metadata.\nError: ${typedError.name}\nError Description: ${typedError.message}`);
523
- }
524
- return null;
525
- }
526
- // Custom Domain scenario, host is trusted because Instance Discovery call succeeded
527
- if (!match) {
528
- this.logger.warning("The developer's authority was not found within the CloudInstanceDiscoveryMetadata returned from the network request.");
529
- this.logger.verbose("Creating custom Authority for custom domain scenario.");
530
- match = Authority.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort);
531
- }
532
- return match;
533
- }
534
- /**
535
- * Get cloud discovery metadata for common authorities
536
- */
537
- getCloudDiscoveryMetadataFromHarcodedValues() {
538
- if (this.canonicalAuthority in InstanceDiscoveryMetadata) {
539
- return InstanceDiscoveryMetadata[this.canonicalAuthority];
540
- }
541
- return null;
542
- }
543
- /**
544
- * Helper function to determine if this host is included in the knownAuthorities config option
545
- */
546
- isInKnownAuthorities() {
547
- const matches = this.authorityOptions.knownAuthorities.filter((authority) => {
548
- return (UrlString.getDomainFromUrl(authority).toLowerCase() ===
549
- this.hostnameAndPort);
550
- });
551
- return matches.length > 0;
552
- }
553
- /**
554
- * helper function to populate the authority based on azureCloudOptions
555
- * @param authorityString
556
- * @param azureCloudOptions
557
- */
558
- static generateAuthority(authorityString, azureCloudOptions) {
559
- let authorityAzureCloudInstance;
560
- if (azureCloudOptions &&
561
- azureCloudOptions.azureCloudInstance !== AzureCloudInstance.None) {
562
- const tenant = azureCloudOptions.tenant
563
- ? azureCloudOptions.tenant
564
- : Constants.DEFAULT_COMMON_TENANT;
565
- authorityAzureCloudInstance = `${azureCloudOptions.azureCloudInstance}/${tenant}/`;
566
- }
567
- return authorityAzureCloudInstance
568
- ? authorityAzureCloudInstance
569
- : authorityString;
570
- }
571
- /**
572
- * Creates cloud discovery metadata object from a given host
573
- * @param host
574
- */
575
- static createCloudDiscoveryMetadataFromHost(host) {
576
- return {
577
- preferred_network: host,
578
- preferred_cache: host,
579
- aliases: [host],
580
- };
581
- }
582
- /**
583
- * Searches instance discovery network response for the entry that contains the host in the aliases list
584
- * @param response
585
- * @param authority
586
- */
587
- static getCloudDiscoveryMetadataFromNetworkResponse(response, authority) {
588
- for (let i = 0; i < response.length; i++) {
589
- const metadata = response[i];
590
- if (metadata.aliases.indexOf(authority) > -1) {
591
- return metadata;
592
- }
593
- }
594
- return null;
595
- }
596
- /**
597
- * helper function to generate environment from authority object
598
- */
599
- getPreferredCache() {
600
- if (this.discoveryComplete()) {
601
- return this.metadata.preferred_cache;
602
- }
603
- else {
604
- throw ClientAuthError.createEndpointDiscoveryIncompleteError("Discovery incomplete.");
605
- }
606
- }
607
- /**
608
- * Returns whether or not the provided host is an alias of this authority instance
609
- * @param host
610
- */
611
- isAlias(host) {
612
- return this.metadata.aliases.indexOf(host) > -1;
613
- }
614
- /**
615
- * Checks whether the provided host is that of a public cloud authority
616
- *
617
- * @param authority string
618
- * @returns bool
619
- */
620
- static isPublicCloudAuthority(host) {
621
- return Constants.KNOWN_PUBLIC_CLOUDS.indexOf(host) >= 0;
622
- }
623
- /**
624
- * Rebuild the authority string with the region
625
- *
626
- * @param host string
627
- * @param region string
628
- */
629
- static buildRegionalAuthorityString(host, region, queryString) {
630
- // Create and validate a Url string object with the initial authority string
631
- const authorityUrlInstance = new UrlString(host);
632
- authorityUrlInstance.validateAsUri();
633
- const authorityUrlParts = authorityUrlInstance.getUrlComponents();
634
- let hostNameAndPort = `${region}.${authorityUrlParts.HostNameAndPort}`;
635
- if (this.isPublicCloudAuthority(authorityUrlParts.HostNameAndPort)) {
636
- hostNameAndPort = `${region}.${Constants.REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX}`;
637
- }
638
- // Include the query string portion of the url
639
- const url = UrlString.constructAuthorityUriFromObject({
640
- ...authorityUrlInstance.getUrlComponents(),
641
- HostNameAndPort: hostNameAndPort,
642
- }).urlString;
643
- // Add the query string if a query string was provided
644
- if (queryString)
645
- return `${url}?${queryString}`;
646
- return url;
647
- }
648
- /**
649
- * Replace the endpoints in the metadata object with their regional equivalents.
650
- *
651
- * @param metadata OpenIdConfigResponse
652
- * @param azureRegion string
653
- */
654
- static replaceWithRegionalInformation(metadata, azureRegion) {
655
- metadata.authorization_endpoint =
656
- Authority.buildRegionalAuthorityString(metadata.authorization_endpoint, azureRegion);
657
- // TODO: Enquire on whether we should leave the query string or remove it before releasing the feature
658
- metadata.token_endpoint = Authority.buildRegionalAuthorityString(metadata.token_endpoint, azureRegion, Constants.REGIONAL_AUTH_NON_MSI_QUERY_STRING);
659
- if (metadata.end_session_endpoint) {
660
- metadata.end_session_endpoint =
661
- Authority.buildRegionalAuthorityString(metadata.end_session_endpoint, azureRegion);
662
- }
663
- return metadata;
664
- }
665
- /**
666
- * Transform CIAM_AUTHORIY as per the below rules:
667
- * If no path segments found and it is a CIAM authority (hostname ends with .ciamlogin.com), then transform it
668
- *
669
- * NOTE: The transformation path should go away once STS supports CIAM with the format: `tenantIdorDomain.ciamlogin.com`
670
- * `ciamlogin.com` can also change in the future and we should accommodate the same
671
- *
672
- * @param authority
673
- */
674
- static transformCIAMAuthority(authority) {
675
- let ciamAuthority = authority.endsWith(Constants.FORWARD_SLASH) ? authority : `${authority}${Constants.FORWARD_SLASH}`;
676
- const authorityUrl = new UrlString(authority);
677
- const authorityUrlComponents = authorityUrl.getUrlComponents();
678
- // check if transformation is needed
679
- if (authorityUrlComponents.PathSegments.length === 0 && (authorityUrlComponents.HostNameAndPort.endsWith(Constants.CIAM_AUTH_URL))) {
680
- const tenantIdOrDomain = authorityUrlComponents.HostNameAndPort.split(".")[0];
681
- ciamAuthority = `${ciamAuthority}${tenantIdOrDomain}${Constants.AAD_TENANT_DOMAIN_SUFFIX}`;
682
- }
683
- return ciamAuthority;
684
- }
685
- }
686
-
687
- export { Authority };
688
- //# sourceMappingURL=Authority.js.map