@azure/msal-common 14.14.2 → 14.16.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 (586) 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 -23
  43. package/dist/cache/CacheManager.d.ts.map +1 -1
  44. package/dist/cache/CacheManager.mjs +1 -4
  45. package/dist/cache/CacheManager.mjs.map +1 -1
  46. package/dist/cache/entities/AccessTokenEntity.d.ts +2 -2
  47. package/dist/cache/entities/AccessTokenEntity.d.ts.map +1 -1
  48. package/dist/cache/entities/AccountEntity.d.ts +6 -6
  49. package/dist/cache/entities/AccountEntity.d.ts.map +1 -1
  50. package/dist/cache/entities/AccountEntity.mjs +1 -1
  51. package/dist/cache/entities/CacheRecord.d.ts +5 -5
  52. package/dist/cache/entities/CacheRecord.d.ts.map +1 -1
  53. package/dist/cache/entities/CredentialEntity.d.ts +1 -1
  54. package/dist/cache/entities/CredentialEntity.d.ts.map +1 -1
  55. package/dist/cache/entities/IdTokenEntity.d.ts +1 -1
  56. package/dist/cache/entities/IdTokenEntity.d.ts.map +1 -1
  57. package/dist/cache/entities/RefreshTokenEntity.d.ts +1 -1
  58. package/dist/cache/entities/RefreshTokenEntity.d.ts.map +1 -1
  59. package/dist/cache/interface/ICacheManager.d.ts +12 -12
  60. package/dist/cache/interface/ICacheManager.d.ts.map +1 -1
  61. package/dist/cache/interface/ICachePlugin.d.ts +1 -1
  62. package/dist/cache/interface/ICachePlugin.d.ts.map +1 -1
  63. package/dist/cache/persistence/TokenCacheContext.d.ts +1 -1
  64. package/dist/cache/persistence/TokenCacheContext.d.ts.map +1 -1
  65. package/dist/cache/persistence/TokenCacheContext.mjs +1 -1
  66. package/dist/cache/utils/CacheHelpers.d.ts +9 -9
  67. package/dist/cache/utils/CacheHelpers.d.ts.map +1 -1
  68. package/dist/cache/utils/CacheHelpers.mjs +1 -1
  69. package/dist/cache/utils/CacheTypes.d.ts +11 -11
  70. package/dist/cache/utils/CacheTypes.d.ts.map +1 -1
  71. package/dist/client/AuthorizationCodeClient.d.ts +10 -9
  72. package/dist/client/AuthorizationCodeClient.d.ts.map +1 -1
  73. package/dist/client/AuthorizationCodeClient.mjs +35 -16
  74. package/dist/client/AuthorizationCodeClient.mjs.map +1 -1
  75. package/dist/client/BaseClient.d.ts +21 -14
  76. package/dist/client/BaseClient.d.ts.map +1 -1
  77. package/dist/client/BaseClient.mjs +62 -10
  78. package/dist/client/BaseClient.mjs.map +1 -1
  79. package/dist/client/RefreshTokenClient.d.ts +6 -6
  80. package/dist/client/RefreshTokenClient.d.ts.map +1 -1
  81. package/dist/client/RefreshTokenClient.mjs +10 -4
  82. package/dist/client/RefreshTokenClient.mjs.map +1 -1
  83. package/dist/client/SilentFlowClient.d.ts +6 -6
  84. package/dist/client/SilentFlowClient.d.ts.map +1 -1
  85. package/dist/client/SilentFlowClient.mjs +1 -1
  86. package/dist/config/ClientConfiguration.d.ts +15 -11
  87. package/dist/config/ClientConfiguration.d.ts.map +1 -1
  88. package/dist/config/ClientConfiguration.mjs +2 -1
  89. package/dist/config/ClientConfiguration.mjs.map +1 -1
  90. package/dist/constants/AADServerParamKeys.d.ts +2 -0
  91. package/dist/constants/AADServerParamKeys.d.ts.map +1 -1
  92. package/dist/constants/AADServerParamKeys.mjs +5 -3
  93. package/dist/constants/AADServerParamKeys.mjs.map +1 -1
  94. package/dist/crypto/ICrypto.d.ts +2 -2
  95. package/dist/crypto/ICrypto.d.ts.map +1 -1
  96. package/dist/crypto/ICrypto.mjs +1 -1
  97. package/dist/crypto/JoseHeader.d.ts +1 -1
  98. package/dist/crypto/JoseHeader.d.ts.map +1 -1
  99. package/dist/crypto/JoseHeader.mjs +1 -1
  100. package/dist/crypto/PopTokenGenerator.d.ts +3 -3
  101. package/dist/crypto/PopTokenGenerator.d.ts.map +1 -1
  102. package/dist/crypto/PopTokenGenerator.mjs +1 -1
  103. package/dist/crypto/SignedHttpRequest.d.ts +1 -1
  104. package/dist/crypto/SignedHttpRequest.d.ts.map +1 -1
  105. package/dist/error/AuthError.d.ts +1 -1
  106. package/dist/error/AuthError.d.ts.map +1 -1
  107. package/dist/error/AuthError.mjs +1 -1
  108. package/dist/error/AuthErrorCodes.mjs +1 -1
  109. package/dist/error/CacheError.d.ts +1 -1
  110. package/dist/error/CacheError.d.ts.map +1 -1
  111. package/dist/error/CacheError.mjs +1 -1
  112. package/dist/error/CacheErrorCodes.mjs +1 -1
  113. package/dist/error/ClientAuthError.d.ts +2 -2
  114. package/dist/error/ClientAuthError.d.ts.map +1 -1
  115. package/dist/error/ClientAuthError.mjs +1 -1
  116. package/dist/error/ClientAuthErrorCodes.mjs +1 -1
  117. package/dist/error/ClientConfigurationError.d.ts +2 -2
  118. package/dist/error/ClientConfigurationError.d.ts.map +1 -1
  119. package/dist/error/ClientConfigurationError.mjs +1 -1
  120. package/dist/error/ClientConfigurationErrorCodes.mjs +1 -1
  121. package/dist/error/InteractionRequiredAuthError.d.ts +2 -2
  122. package/dist/error/InteractionRequiredAuthError.d.ts.map +1 -1
  123. package/dist/error/InteractionRequiredAuthError.mjs +1 -1
  124. package/dist/error/InteractionRequiredAuthErrorCodes.mjs +1 -1
  125. package/dist/error/JoseHeaderError.d.ts +2 -2
  126. package/dist/error/JoseHeaderError.d.ts.map +1 -1
  127. package/dist/error/JoseHeaderError.mjs +1 -1
  128. package/dist/error/JoseHeaderErrorCodes.mjs +1 -1
  129. package/dist/error/NetworkError.d.ts +19 -0
  130. package/dist/error/NetworkError.d.ts.map +1 -0
  131. package/dist/error/NetworkError.mjs +34 -0
  132. package/dist/error/NetworkError.mjs.map +1 -0
  133. package/dist/error/ServerError.d.ts +1 -1
  134. package/dist/error/ServerError.d.ts.map +1 -1
  135. package/dist/error/ServerError.mjs +1 -1
  136. package/dist/exports-browser-only.d.ts +10 -0
  137. package/dist/exports-browser-only.d.ts.map +1 -0
  138. package/dist/exports-common.d.ts +81 -0
  139. package/dist/exports-common.d.ts.map +1 -0
  140. package/dist/exports-node-only.d.ts +18 -0
  141. package/dist/exports-node-only.d.ts.map +1 -0
  142. package/dist/index-browser.d.ts +7 -0
  143. package/dist/index-browser.d.ts.map +1 -0
  144. package/dist/index-browser.mjs +67 -0
  145. package/dist/index-browser.mjs.map +1 -0
  146. package/dist/index-node.d.ts +7 -0
  147. package/dist/index-node.d.ts.map +1 -0
  148. package/dist/index-node.mjs +66 -0
  149. package/dist/index-node.mjs.map +1 -0
  150. package/dist/index.d.ts +7 -103
  151. package/dist/index.d.ts.map +1 -1
  152. package/dist/index.mjs +31 -31
  153. package/dist/logger/Logger.d.ts +1 -1
  154. package/dist/logger/Logger.d.ts.map +1 -1
  155. package/dist/logger/Logger.mjs +1 -1
  156. package/dist/network/INetworkModule.d.ts +1 -1
  157. package/dist/network/INetworkModule.d.ts.map +1 -1
  158. package/dist/network/INetworkModule.mjs +1 -1
  159. package/dist/network/NetworkResponse.d.ts +6 -0
  160. package/dist/network/NetworkResponse.d.ts.map +1 -0
  161. package/dist/network/RequestThumbprint.d.ts +2 -2
  162. package/dist/network/RequestThumbprint.d.ts.map +1 -1
  163. package/dist/network/ThrottlingUtils.d.ts +5 -5
  164. package/dist/network/ThrottlingUtils.d.ts.map +1 -1
  165. package/dist/network/ThrottlingUtils.mjs +1 -1
  166. package/dist/packageMetadata.d.ts +1 -1
  167. package/dist/packageMetadata.mjs +2 -2
  168. package/dist/request/AuthenticationHeaderParser.mjs +1 -1
  169. package/dist/request/BaseAuthRequest.d.ts +7 -5
  170. package/dist/request/BaseAuthRequest.d.ts.map +1 -1
  171. package/dist/request/CommonAuthorizationCodeRequest.d.ts +3 -3
  172. package/dist/request/CommonAuthorizationCodeRequest.d.ts.map +1 -1
  173. package/dist/request/CommonAuthorizationUrlRequest.d.ts +4 -4
  174. package/dist/request/CommonAuthorizationUrlRequest.d.ts.map +1 -1
  175. package/dist/request/CommonClientCredentialRequest.d.ts +3 -3
  176. package/dist/request/CommonClientCredentialRequest.d.ts.map +1 -1
  177. package/dist/request/CommonDeviceCodeRequest.d.ts +3 -3
  178. package/dist/request/CommonDeviceCodeRequest.d.ts.map +1 -1
  179. package/dist/request/CommonEndSessionRequest.d.ts +2 -2
  180. package/dist/request/CommonEndSessionRequest.d.ts.map +1 -1
  181. package/dist/request/CommonOnBehalfOfRequest.d.ts +1 -1
  182. package/dist/request/CommonOnBehalfOfRequest.d.ts.map +1 -1
  183. package/dist/request/CommonRefreshTokenRequest.d.ts +3 -3
  184. package/dist/request/CommonRefreshTokenRequest.d.ts.map +1 -1
  185. package/dist/request/CommonSilentFlowRequest.d.ts +3 -3
  186. package/dist/request/CommonSilentFlowRequest.d.ts.map +1 -1
  187. package/dist/request/CommonUsernamePasswordRequest.d.ts +1 -1
  188. package/dist/request/CommonUsernamePasswordRequest.d.ts.map +1 -1
  189. package/dist/request/NativeRequest.d.ts +1 -1
  190. package/dist/request/NativeRequest.d.ts.map +1 -1
  191. package/dist/request/RequestParameterBuilder.d.ts +13 -6
  192. package/dist/request/RequestParameterBuilder.d.ts.map +1 -1
  193. package/dist/request/RequestParameterBuilder.mjs +26 -3
  194. package/dist/request/RequestParameterBuilder.mjs.map +1 -1
  195. package/dist/request/RequestValidator.mjs +1 -1
  196. package/dist/request/ScopeSet.mjs +1 -1
  197. package/dist/response/AuthenticationResult.d.ts +1 -1
  198. package/dist/response/AuthenticationResult.d.ts.map +1 -1
  199. package/dist/response/ExternalTokenResponse.d.ts +1 -1
  200. package/dist/response/ExternalTokenResponse.d.ts.map +1 -1
  201. package/dist/response/ResponseHandler.d.ts +16 -16
  202. package/dist/response/ResponseHandler.d.ts.map +1 -1
  203. package/dist/response/ResponseHandler.mjs +1 -1
  204. package/dist/response/ServerAuthorizationTokenResponse.d.ts +1 -1
  205. package/dist/response/ServerAuthorizationTokenResponse.d.ts.map +1 -1
  206. package/dist/telemetry/performance/IPerformanceClient.d.ts +2 -2
  207. package/dist/telemetry/performance/IPerformanceClient.d.ts.map +1 -1
  208. package/dist/telemetry/performance/PerformanceClient.d.ts +5 -5
  209. package/dist/telemetry/performance/PerformanceClient.d.ts.map +1 -1
  210. package/dist/telemetry/performance/PerformanceClient.mjs +29 -10
  211. package/dist/telemetry/performance/PerformanceClient.mjs.map +1 -1
  212. package/dist/telemetry/performance/PerformanceEvent.d.ts +9 -0
  213. package/dist/telemetry/performance/PerformanceEvent.d.ts.map +1 -1
  214. package/dist/telemetry/performance/PerformanceEvent.mjs +6 -1
  215. package/dist/telemetry/performance/PerformanceEvent.mjs.map +1 -1
  216. package/dist/telemetry/performance/StubPerformanceClient.d.ts +3 -3
  217. package/dist/telemetry/performance/StubPerformanceClient.d.ts.map +1 -1
  218. package/dist/telemetry/performance/StubPerformanceClient.mjs +1 -1
  219. package/dist/telemetry/performance/StubPerformanceClient.mjs.map +1 -1
  220. package/dist/telemetry/server/ServerTelemetryManager.d.ts +5 -5
  221. package/dist/telemetry/server/ServerTelemetryManager.d.ts.map +1 -1
  222. package/dist/telemetry/server/ServerTelemetryManager.mjs +1 -1
  223. package/dist/url/UrlString.d.ts +1 -1
  224. package/dist/url/UrlString.d.ts.map +1 -1
  225. package/dist/url/UrlString.mjs +1 -1
  226. package/dist/utils/ClientAssertionUtils.d.ts +1 -1
  227. package/dist/utils/ClientAssertionUtils.d.ts.map +1 -1
  228. package/dist/utils/ClientAssertionUtils.mjs +1 -1
  229. package/dist/utils/Constants.d.ts +1 -0
  230. package/dist/utils/Constants.d.ts.map +1 -1
  231. package/dist/utils/Constants.mjs +2 -1
  232. package/dist/utils/Constants.mjs.map +1 -1
  233. package/dist/utils/FunctionWrappers.d.ts +2 -2
  234. package/dist/utils/FunctionWrappers.d.ts.map +1 -1
  235. package/dist/utils/FunctionWrappers.mjs +1 -1
  236. package/dist/utils/ProtocolUtils.d.ts +1 -1
  237. package/dist/utils/ProtocolUtils.d.ts.map +1 -1
  238. package/dist/utils/ProtocolUtils.mjs +1 -1
  239. package/dist/utils/StringUtils.mjs +1 -1
  240. package/dist/utils/TimeUtils.mjs +1 -1
  241. package/dist/utils/UrlUtils.d.ts +1 -1
  242. package/dist/utils/UrlUtils.d.ts.map +1 -1
  243. package/dist/utils/UrlUtils.mjs +1 -1
  244. package/lib/index-browser.cjs +858 -0
  245. package/lib/index-browser.cjs.map +1 -0
  246. package/{dist/index.cjs → lib/index-node-C9XsExml.js} +352 -990
  247. package/lib/index-node-C9XsExml.js.map +1 -0
  248. package/lib/index-node.cjs +104 -0
  249. package/lib/index-node.cjs.map +1 -0
  250. package/lib/index.cjs +112 -0
  251. package/lib/index.cjs.map +1 -0
  252. package/lib/package.json +1 -0
  253. package/lib/types/account/AccountInfo.d.ts +67 -0
  254. package/lib/types/account/AccountInfo.d.ts.map +1 -0
  255. package/lib/types/account/AuthToken.d.ts +18 -0
  256. package/lib/types/account/AuthToken.d.ts.map +1 -0
  257. package/lib/types/account/CcsCredential.d.ts +10 -0
  258. package/lib/types/account/CcsCredential.d.ts.map +1 -0
  259. package/lib/types/account/ClientCredentials.d.ts +20 -0
  260. package/lib/types/account/ClientCredentials.d.ts.map +1 -0
  261. package/lib/types/account/ClientInfo.d.ts +19 -0
  262. package/lib/types/account/ClientInfo.d.ts.map +1 -0
  263. package/lib/types/account/TokenClaims.d.ts +84 -0
  264. package/lib/types/account/TokenClaims.d.ts.map +1 -0
  265. package/lib/types/authority/Authority.d.ts +255 -0
  266. package/lib/types/authority/Authority.d.ts.map +1 -0
  267. package/lib/types/authority/AuthorityFactory.d.ts +19 -0
  268. package/lib/types/authority/AuthorityFactory.d.ts.map +1 -0
  269. package/lib/types/authority/AuthorityMetadata.d.ts +44 -0
  270. package/lib/types/authority/AuthorityMetadata.d.ts.map +1 -0
  271. package/lib/types/authority/AuthorityOptions.d.ts +28 -0
  272. package/lib/types/authority/AuthorityOptions.d.ts.map +1 -0
  273. package/lib/types/authority/AuthorityType.d.ts +11 -0
  274. package/lib/types/authority/AuthorityType.d.ts.map +1 -0
  275. package/lib/types/authority/AzureRegion.d.ts +2 -0
  276. package/lib/types/authority/AzureRegion.d.ts.map +1 -0
  277. package/lib/types/authority/AzureRegionConfiguration.d.ts +6 -0
  278. package/lib/types/authority/AzureRegionConfiguration.d.ts.map +1 -0
  279. package/lib/types/authority/CloudDiscoveryMetadata.d.ts +6 -0
  280. package/lib/types/authority/CloudDiscoveryMetadata.d.ts.map +1 -0
  281. package/lib/types/authority/CloudInstanceDiscoveryErrorResponse.d.ts +14 -0
  282. package/lib/types/authority/CloudInstanceDiscoveryErrorResponse.d.ts.map +1 -0
  283. package/lib/types/authority/CloudInstanceDiscoveryResponse.d.ts +10 -0
  284. package/lib/types/authority/CloudInstanceDiscoveryResponse.d.ts.map +1 -0
  285. package/lib/types/authority/ImdsOptions.d.ts +6 -0
  286. package/lib/types/authority/ImdsOptions.d.ts.map +1 -0
  287. package/lib/types/authority/OIDCOptions.d.ts +9 -0
  288. package/lib/types/authority/OIDCOptions.d.ts.map +1 -0
  289. package/lib/types/authority/OpenIdConfigResponse.d.ts +12 -0
  290. package/lib/types/authority/OpenIdConfigResponse.d.ts.map +1 -0
  291. package/lib/types/authority/ProtocolMode.d.ts +9 -0
  292. package/lib/types/authority/ProtocolMode.d.ts.map +1 -0
  293. package/lib/types/authority/RegionDiscovery.d.ts +33 -0
  294. package/lib/types/authority/RegionDiscovery.d.ts.map +1 -0
  295. package/lib/types/authority/RegionDiscoveryMetadata.d.ts +7 -0
  296. package/lib/types/authority/RegionDiscoveryMetadata.d.ts.map +1 -0
  297. package/lib/types/broker/nativeBroker/INativeBrokerPlugin.d.ts +16 -0
  298. package/lib/types/broker/nativeBroker/INativeBrokerPlugin.d.ts.map +1 -0
  299. package/lib/types/cache/CacheManager.d.ts +493 -0
  300. package/lib/types/cache/CacheManager.d.ts.map +1 -0
  301. package/lib/types/cache/entities/AccessTokenEntity.d.ts +26 -0
  302. package/lib/types/cache/entities/AccessTokenEntity.d.ts.map +1 -0
  303. package/lib/types/cache/entities/AccountEntity.d.ts +107 -0
  304. package/lib/types/cache/entities/AccountEntity.d.ts.map +1 -0
  305. package/lib/types/cache/entities/AppMetadataEntity.d.ts +12 -0
  306. package/lib/types/cache/entities/AppMetadataEntity.d.ts.map +1 -0
  307. package/lib/types/cache/entities/AuthorityMetadataEntity.d.ts +16 -0
  308. package/lib/types/cache/entities/AuthorityMetadataEntity.d.ts.map +1 -0
  309. package/lib/types/cache/entities/CacheRecord.d.ts +14 -0
  310. package/lib/types/cache/entities/CacheRecord.d.ts.map +1 -0
  311. package/lib/types/cache/entities/CredentialEntity.d.ts +31 -0
  312. package/lib/types/cache/entities/CredentialEntity.d.ts.map +1 -0
  313. package/lib/types/cache/entities/IdTokenEntity.d.ts +9 -0
  314. package/lib/types/cache/entities/IdTokenEntity.d.ts.map +1 -0
  315. package/lib/types/cache/entities/RefreshTokenEntity.d.ts +8 -0
  316. package/lib/types/cache/entities/RefreshTokenEntity.d.ts.map +1 -0
  317. package/lib/types/cache/entities/ServerTelemetryEntity.d.ts +7 -0
  318. package/lib/types/cache/entities/ServerTelemetryEntity.d.ts.map +1 -0
  319. package/lib/types/cache/entities/ThrottlingEntity.d.ts +8 -0
  320. package/lib/types/cache/entities/ThrottlingEntity.d.ts.map +1 -0
  321. package/lib/types/cache/interface/ICacheManager.d.ts +167 -0
  322. package/lib/types/cache/interface/ICacheManager.d.ts.map +1 -0
  323. package/lib/types/cache/interface/ICachePlugin.d.ts +6 -0
  324. package/lib/types/cache/interface/ICachePlugin.d.ts.map +1 -0
  325. package/lib/types/cache/interface/ISerializableTokenCache.d.ts +5 -0
  326. package/lib/types/cache/interface/ISerializableTokenCache.d.ts.map +1 -0
  327. package/lib/types/cache/persistence/TokenCacheContext.d.ts +24 -0
  328. package/lib/types/cache/persistence/TokenCacheContext.d.ts.map +1 -0
  329. package/lib/types/cache/utils/CacheHelpers.d.ts +95 -0
  330. package/lib/types/cache/utils/CacheHelpers.d.ts.map +1 -0
  331. package/lib/types/cache/utils/CacheTypes.d.ts +70 -0
  332. package/lib/types/cache/utils/CacheTypes.d.ts.map +1 -0
  333. package/lib/types/client/AuthorizationCodeClient.d.ts +76 -0
  334. package/lib/types/client/AuthorizationCodeClient.d.ts.map +1 -0
  335. package/lib/types/client/BaseClient.d.ts +59 -0
  336. package/lib/types/client/BaseClient.d.ts.map +1 -0
  337. package/lib/types/client/RefreshTokenClient.d.ts +36 -0
  338. package/lib/types/client/RefreshTokenClient.d.ts.map +1 -0
  339. package/lib/types/client/SilentFlowClient.d.ts +28 -0
  340. package/lib/types/client/SilentFlowClient.d.ts.map +1 -0
  341. package/lib/types/config/AppTokenProvider.d.ts +39 -0
  342. package/lib/types/config/AppTokenProvider.d.ts.map +1 -0
  343. package/lib/types/config/ClientConfiguration.d.ts +155 -0
  344. package/lib/types/config/ClientConfiguration.d.ts.map +1 -0
  345. package/lib/types/constants/AADServerParamKeys.d.ts +56 -0
  346. package/lib/types/constants/AADServerParamKeys.d.ts.map +1 -0
  347. package/lib/types/crypto/ICrypto.d.ts +69 -0
  348. package/lib/types/crypto/ICrypto.d.ts.map +1 -0
  349. package/lib/types/crypto/IGuidGenerator.d.ts +5 -0
  350. package/lib/types/crypto/IGuidGenerator.d.ts.map +1 -0
  351. package/lib/types/crypto/JoseHeader.d.ts +23 -0
  352. package/lib/types/crypto/JoseHeader.d.ts.map +1 -0
  353. package/lib/types/crypto/PopTokenGenerator.d.ts +60 -0
  354. package/lib/types/crypto/PopTokenGenerator.d.ts.map +1 -0
  355. package/lib/types/crypto/SignedHttpRequest.d.ts +16 -0
  356. package/lib/types/crypto/SignedHttpRequest.d.ts.map +1 -0
  357. package/lib/types/error/AuthError.d.ts +45 -0
  358. package/lib/types/error/AuthError.d.ts.map +1 -0
  359. package/lib/types/error/AuthErrorCodes.d.ts +6 -0
  360. package/lib/types/error/AuthErrorCodes.d.ts.map +1 -0
  361. package/lib/types/error/CacheError.d.ts +21 -0
  362. package/lib/types/error/CacheError.d.ts.map +1 -0
  363. package/lib/types/error/CacheErrorCodes.d.ts +3 -0
  364. package/lib/types/error/CacheErrorCodes.d.ts.map +1 -0
  365. package/lib/types/error/ClientAuthError.d.ts +238 -0
  366. package/lib/types/error/ClientAuthError.d.ts.map +1 -0
  367. package/lib/types/error/ClientAuthErrorCodes.d.ts +45 -0
  368. package/lib/types/error/ClientAuthErrorCodes.d.ts.map +1 -0
  369. package/lib/types/error/ClientConfigurationError.d.ts +129 -0
  370. package/lib/types/error/ClientConfigurationError.d.ts.map +1 -0
  371. package/lib/types/error/ClientConfigurationErrorCodes.d.ts +23 -0
  372. package/lib/types/error/ClientConfigurationErrorCodes.d.ts.map +1 -0
  373. package/lib/types/error/InteractionRequiredAuthError.d.ts +66 -0
  374. package/lib/types/error/InteractionRequiredAuthError.d.ts.map +1 -0
  375. package/lib/types/error/InteractionRequiredAuthErrorCodes.d.ts +8 -0
  376. package/lib/types/error/InteractionRequiredAuthErrorCodes.d.ts.map +1 -0
  377. package/lib/types/error/JoseHeaderError.d.ts +16 -0
  378. package/lib/types/error/JoseHeaderError.d.ts.map +1 -0
  379. package/lib/types/error/JoseHeaderErrorCodes.d.ts +3 -0
  380. package/lib/types/error/JoseHeaderErrorCodes.d.ts.map +1 -0
  381. package/lib/types/error/NetworkError.d.ts +19 -0
  382. package/lib/types/error/NetworkError.d.ts.map +1 -0
  383. package/lib/types/error/ServerError.d.ts +16 -0
  384. package/lib/types/error/ServerError.d.ts.map +1 -0
  385. package/lib/types/exports-browser-only.d.ts +10 -0
  386. package/lib/types/exports-browser-only.d.ts.map +1 -0
  387. package/lib/types/exports-common.d.ts +81 -0
  388. package/lib/types/exports-common.d.ts.map +1 -0
  389. package/lib/types/exports-node-only.d.ts +18 -0
  390. package/lib/types/exports-node-only.d.ts.map +1 -0
  391. package/lib/types/index-browser.d.ts +7 -0
  392. package/lib/types/index-browser.d.ts.map +1 -0
  393. package/lib/types/index-node.d.ts +7 -0
  394. package/lib/types/index-node.d.ts.map +1 -0
  395. package/lib/types/index.d.ts +12 -0
  396. package/lib/types/index.d.ts.map +1 -0
  397. package/lib/types/logger/Logger.d.ts +96 -0
  398. package/lib/types/logger/Logger.d.ts.map +1 -0
  399. package/lib/types/network/INetworkModule.d.ts +30 -0
  400. package/lib/types/network/INetworkModule.d.ts.map +1 -0
  401. package/lib/types/network/NetworkResponse.d.ts +6 -0
  402. package/lib/types/network/NetworkResponse.d.ts.map +1 -0
  403. package/lib/types/network/RequestThumbprint.d.ts +19 -0
  404. package/lib/types/network/RequestThumbprint.d.ts.map +1 -0
  405. package/lib/types/network/ThrottlingUtils.d.ts +43 -0
  406. package/lib/types/network/ThrottlingUtils.d.ts.map +1 -0
  407. package/lib/types/packageMetadata.d.ts +3 -0
  408. package/lib/types/packageMetadata.d.ts.map +1 -0
  409. package/lib/types/request/AuthenticationHeaderParser.d.ts +20 -0
  410. package/lib/types/request/AuthenticationHeaderParser.d.ts.map +1 -0
  411. package/lib/types/request/BaseAuthRequest.d.ts +50 -0
  412. package/lib/types/request/BaseAuthRequest.d.ts.map +1 -0
  413. package/lib/types/request/CommonAuthorizationCodeRequest.d.ts +28 -0
  414. package/lib/types/request/CommonAuthorizationCodeRequest.d.ts.map +1 -0
  415. package/lib/types/request/CommonAuthorizationUrlRequest.d.ts +51 -0
  416. package/lib/types/request/CommonAuthorizationUrlRequest.d.ts.map +1 -0
  417. package/lib/types/request/CommonClientCredentialRequest.d.ts +18 -0
  418. package/lib/types/request/CommonClientCredentialRequest.d.ts.map +1 -0
  419. package/lib/types/request/CommonDeviceCodeRequest.d.ts +22 -0
  420. package/lib/types/request/CommonDeviceCodeRequest.d.ts.map +1 -0
  421. package/lib/types/request/CommonEndSessionRequest.d.ts +22 -0
  422. package/lib/types/request/CommonEndSessionRequest.d.ts.map +1 -0
  423. package/lib/types/request/CommonOnBehalfOfRequest.d.ts +14 -0
  424. package/lib/types/request/CommonOnBehalfOfRequest.d.ts.map +1 -0
  425. package/lib/types/request/CommonRefreshTokenRequest.d.ts +23 -0
  426. package/lib/types/request/CommonRefreshTokenRequest.d.ts.map +1 -0
  427. package/lib/types/request/CommonSilentFlowRequest.d.ts +28 -0
  428. package/lib/types/request/CommonSilentFlowRequest.d.ts.map +1 -0
  429. package/lib/types/request/CommonUsernamePasswordRequest.d.ts +18 -0
  430. package/lib/types/request/CommonUsernamePasswordRequest.d.ts.map +1 -0
  431. package/lib/types/request/NativeRequest.d.ts +20 -0
  432. package/lib/types/request/NativeRequest.d.ts.map +1 -0
  433. package/lib/types/request/NativeSignOutRequest.d.ts +6 -0
  434. package/lib/types/request/NativeSignOutRequest.d.ts.map +1 -0
  435. package/lib/types/request/RequestParameterBuilder.d.ts +225 -0
  436. package/lib/types/request/RequestParameterBuilder.d.ts.map +1 -0
  437. package/lib/types/request/RequestValidator.d.ts +28 -0
  438. package/lib/types/request/RequestValidator.d.ts.map +1 -0
  439. package/lib/types/request/ScopeSet.d.ts +89 -0
  440. package/lib/types/request/ScopeSet.d.ts.map +1 -0
  441. package/lib/types/request/StoreInCache.d.ts +9 -0
  442. package/lib/types/request/StoreInCache.d.ts.map +1 -0
  443. package/lib/types/response/AuthenticationResult.d.ts +42 -0
  444. package/lib/types/response/AuthenticationResult.d.ts.map +1 -0
  445. package/lib/types/response/AuthorizationCodePayload.d.ts +14 -0
  446. package/lib/types/response/AuthorizationCodePayload.d.ts.map +1 -0
  447. package/lib/types/response/DeviceCodeResponse.d.ts +26 -0
  448. package/lib/types/response/DeviceCodeResponse.d.ts.map +1 -0
  449. package/lib/types/response/ExternalTokenResponse.d.ts +16 -0
  450. package/lib/types/response/ExternalTokenResponse.d.ts.map +1 -0
  451. package/lib/types/response/IMDSBadResponse.d.ts +5 -0
  452. package/lib/types/response/IMDSBadResponse.d.ts.map +1 -0
  453. package/lib/types/response/ResponseHandler.d.ts +70 -0
  454. package/lib/types/response/ResponseHandler.d.ts.map +1 -0
  455. package/lib/types/response/ServerAuthorizationCodeResponse.d.ts +27 -0
  456. package/lib/types/response/ServerAuthorizationCodeResponse.d.ts.map +1 -0
  457. package/lib/types/response/ServerAuthorizationTokenResponse.d.ts +48 -0
  458. package/lib/types/response/ServerAuthorizationTokenResponse.d.ts.map +1 -0
  459. package/lib/types/telemetry/performance/IPerformanceClient.d.ts +58 -0
  460. package/lib/types/telemetry/performance/IPerformanceClient.d.ts.map +1 -0
  461. package/lib/types/telemetry/performance/IPerformanceMeasurement.d.ts +6 -0
  462. package/lib/types/telemetry/performance/IPerformanceMeasurement.d.ts.map +1 -0
  463. package/lib/types/telemetry/performance/PerformanceClient.d.ts +243 -0
  464. package/lib/types/telemetry/performance/PerformanceClient.d.ts.map +1 -0
  465. package/lib/types/telemetry/performance/PerformanceEvent.d.ts +521 -0
  466. package/lib/types/telemetry/performance/PerformanceEvent.d.ts.map +1 -0
  467. package/lib/types/telemetry/performance/StubPerformanceClient.d.ts +25 -0
  468. package/lib/types/telemetry/performance/StubPerformanceClient.d.ts.map +1 -0
  469. package/lib/types/telemetry/server/ServerTelemetryManager.d.ts +79 -0
  470. package/lib/types/telemetry/server/ServerTelemetryManager.d.ts.map +1 -0
  471. package/lib/types/telemetry/server/ServerTelemetryRequest.d.ts +9 -0
  472. package/lib/types/telemetry/server/ServerTelemetryRequest.d.ts.map +1 -0
  473. package/lib/types/url/IUri.d.ts +13 -0
  474. package/lib/types/url/IUri.d.ts.map +1 -0
  475. package/lib/types/url/UrlString.d.ts +49 -0
  476. package/lib/types/url/UrlString.d.ts.map +1 -0
  477. package/lib/types/utils/ClientAssertionUtils.d.ts +3 -0
  478. package/lib/types/utils/ClientAssertionUtils.d.ts.map +1 -0
  479. package/lib/types/utils/Constants.d.ts +311 -0
  480. package/lib/types/utils/Constants.d.ts.map +1 -0
  481. package/lib/types/utils/FunctionWrappers.d.ts +28 -0
  482. package/lib/types/utils/FunctionWrappers.d.ts.map +1 -0
  483. package/lib/types/utils/MsalTypes.d.ts +7 -0
  484. package/lib/types/utils/MsalTypes.d.ts.map +1 -0
  485. package/lib/types/utils/ProtocolUtils.d.ts +43 -0
  486. package/lib/types/utils/ProtocolUtils.d.ts.map +1 -0
  487. package/lib/types/utils/StringUtils.d.ts +41 -0
  488. package/lib/types/utils/StringUtils.d.ts.map +1 -0
  489. package/lib/types/utils/TimeUtils.d.ts +26 -0
  490. package/lib/types/utils/TimeUtils.d.ts.map +1 -0
  491. package/lib/types/utils/UrlUtils.d.ts +11 -0
  492. package/lib/types/utils/UrlUtils.d.ts.map +1 -0
  493. package/node/README.md +1 -0
  494. package/node/package.json +5 -0
  495. package/package.json +38 -11
  496. package/src/account/AccountInfo.ts +1 -1
  497. package/src/account/AuthToken.ts +2 -2
  498. package/src/account/ClientInfo.ts +2 -2
  499. package/src/authority/Authority.ts +26 -26
  500. package/src/authority/AuthorityFactory.ts +9 -9
  501. package/src/authority/AuthorityMetadata.ts +7 -7
  502. package/src/authority/AuthorityOptions.ts +4 -4
  503. package/src/authority/AzureRegionConfiguration.ts +1 -1
  504. package/src/authority/CloudInstanceDiscoveryResponse.ts +1 -1
  505. package/src/authority/OIDCOptions.ts +1 -1
  506. package/src/authority/RegionDiscovery.ts +10 -10
  507. package/src/authority/RegionDiscoveryMetadata.ts +1 -1
  508. package/src/broker/nativeBroker/INativeBrokerPlugin.ts +5 -5
  509. package/src/cache/CacheManager.ts +28 -36
  510. package/src/cache/entities/AccessTokenEntity.ts +2 -2
  511. package/src/cache/entities/AccountEntity.ts +10 -10
  512. package/src/cache/entities/CacheRecord.ts +5 -5
  513. package/src/cache/entities/CredentialEntity.ts +1 -1
  514. package/src/cache/entities/IdTokenEntity.ts +1 -1
  515. package/src/cache/entities/RefreshTokenEntity.ts +1 -1
  516. package/src/cache/interface/ICacheManager.ts +12 -12
  517. package/src/cache/interface/ICachePlugin.ts +1 -1
  518. package/src/cache/persistence/TokenCacheContext.ts +1 -1
  519. package/src/cache/utils/CacheHelpers.ts +13 -13
  520. package/src/cache/utils/CacheTypes.ts +11 -11
  521. package/src/client/AuthorizationCodeClient.ts +86 -52
  522. package/src/client/BaseClient.ts +121 -39
  523. package/src/client/RefreshTokenClient.ts +42 -33
  524. package/src/client/SilentFlowClient.ts +17 -17
  525. package/src/config/ClientConfiguration.ts +20 -15
  526. package/src/constants/AADServerParamKeys.ts +2 -0
  527. package/src/crypto/ICrypto.ts +3 -3
  528. package/src/crypto/JoseHeader.ts +2 -2
  529. package/src/crypto/PopTokenGenerator.ts +7 -7
  530. package/src/crypto/SignedHttpRequest.ts +1 -1
  531. package/src/error/AuthError.ts +2 -2
  532. package/src/error/CacheError.ts +1 -1
  533. package/src/error/ClientAuthError.ts +2 -2
  534. package/src/error/ClientConfigurationError.ts +2 -2
  535. package/src/error/InteractionRequiredAuthError.ts +3 -3
  536. package/src/error/JoseHeaderError.ts +2 -2
  537. package/src/error/NetworkError.ts +44 -0
  538. package/src/error/ServerError.ts +1 -1
  539. package/src/exports-browser-only.ts +29 -0
  540. package/src/exports-common.ts +189 -0
  541. package/src/exports-node-only.ts +35 -0
  542. package/src/index-browser.ts +11 -0
  543. package/src/index-node.ts +11 -0
  544. package/src/index.ts +7 -250
  545. package/src/logger/Logger.ts +2 -2
  546. package/src/network/INetworkModule.ts +2 -2
  547. package/src/network/NetworkResponse.ts +10 -0
  548. package/src/network/RequestThumbprint.ts +2 -2
  549. package/src/network/ThrottlingUtils.ts +8 -8
  550. package/src/packageMetadata.ts +1 -1
  551. package/src/request/AuthenticationHeaderParser.ts +2 -2
  552. package/src/request/BaseAuthRequest.ts +7 -5
  553. package/src/request/CommonAuthorizationCodeRequest.ts +3 -3
  554. package/src/request/CommonAuthorizationUrlRequest.ts +4 -4
  555. package/src/request/CommonClientCredentialRequest.ts +3 -3
  556. package/src/request/CommonDeviceCodeRequest.ts +3 -3
  557. package/src/request/CommonEndSessionRequest.ts +2 -2
  558. package/src/request/CommonOnBehalfOfRequest.ts +1 -1
  559. package/src/request/CommonRefreshTokenRequest.ts +3 -3
  560. package/src/request/CommonSilentFlowRequest.ts +3 -3
  561. package/src/request/CommonUsernamePasswordRequest.ts +1 -1
  562. package/src/request/NativeRequest.ts +1 -1
  563. package/src/request/RequestParameterBuilder.ts +60 -10
  564. package/src/request/RequestValidator.ts +2 -2
  565. package/src/request/ScopeSet.ts +4 -4
  566. package/src/response/AuthenticationResult.ts +1 -1
  567. package/src/response/ExternalTokenResponse.ts +1 -1
  568. package/src/response/ResponseHandler.ts +31 -31
  569. package/src/response/ServerAuthorizationTokenResponse.ts +1 -1
  570. package/src/telemetry/performance/IPerformanceClient.ts +2 -2
  571. package/src/telemetry/performance/PerformanceClient.ts +52 -22
  572. package/src/telemetry/performance/PerformanceEvent.ts +15 -0
  573. package/src/telemetry/performance/StubPerformanceClient.ts +6 -3
  574. package/src/telemetry/server/ServerTelemetryManager.ts +6 -6
  575. package/src/url/UrlString.ts +5 -5
  576. package/src/utils/ClientAssertionUtils.ts +1 -1
  577. package/src/utils/Constants.ts +1 -0
  578. package/src/utils/FunctionWrappers.ts +2 -2
  579. package/src/utils/ProtocolUtils.ts +3 -3
  580. package/src/utils/UrlUtils.ts +2 -2
  581. package/dist/index.cjs.map +0 -1
  582. package/dist/network/NetworkManager.d.ts +0 -34
  583. package/dist/network/NetworkManager.d.ts.map +0 -1
  584. package/dist/network/NetworkManager.mjs +0 -44
  585. package/dist/network/NetworkManager.mjs.map +0 -1
  586. package/src/network/NetworkManager.ts +0 -76
@@ -0,0 +1,493 @@
1
+ import { AccountFilter, CredentialFilter, ValidCredentialType, AppMetadataFilter, AppMetadataCache, TokenKeys } from "./utils/CacheTypes.js";
2
+ import { CacheRecord } from "./entities/CacheRecord.js";
3
+ import { AccountEntity } from "./entities/AccountEntity.js";
4
+ import { AccessTokenEntity } from "./entities/AccessTokenEntity.js";
5
+ import { IdTokenEntity } from "./entities/IdTokenEntity.js";
6
+ import { RefreshTokenEntity } from "./entities/RefreshTokenEntity.js";
7
+ import { ICacheManager } from "./interface/ICacheManager.js";
8
+ import { AccountInfo } from "../account/AccountInfo.js";
9
+ import { AppMetadataEntity } from "./entities/AppMetadataEntity.js";
10
+ import { ServerTelemetryEntity } from "./entities/ServerTelemetryEntity.js";
11
+ import { ThrottlingEntity } from "./entities/ThrottlingEntity.js";
12
+ import { ICrypto } from "../crypto/ICrypto.js";
13
+ import { AuthorityMetadataEntity } from "./entities/AuthorityMetadataEntity.js";
14
+ import { BaseAuthRequest } from "../request/BaseAuthRequest.js";
15
+ import { Logger } from "../logger/Logger.js";
16
+ import { StoreInCache } from "../request/StoreInCache.js";
17
+ import { StaticAuthorityOptions } from "../authority/AuthorityOptions.js";
18
+ import { IPerformanceClient } from "../telemetry/performance/IPerformanceClient.js";
19
+ /**
20
+ * Interface class which implement cache storage functions used by MSAL to perform validity checks, and store tokens.
21
+ * @internal
22
+ */
23
+ export declare abstract class CacheManager implements ICacheManager {
24
+ protected clientId: string;
25
+ protected cryptoImpl: ICrypto;
26
+ private commonLogger;
27
+ private staticAuthorityOptions?;
28
+ constructor(clientId: string, cryptoImpl: ICrypto, logger: Logger, staticAuthorityOptions?: StaticAuthorityOptions);
29
+ /**
30
+ * fetch the account entity from the platform cache
31
+ * @param accountKey
32
+ */
33
+ abstract getAccount(accountKey: string, logger?: Logger): AccountEntity | null;
34
+ /**
35
+ * Returns deserialized account if found in the cache, otherwiser returns null
36
+ */
37
+ abstract getCachedAccountEntity(accountKey: string): AccountEntity | null;
38
+ /**
39
+ * set account entity in the platform cache
40
+ * @param account
41
+ */
42
+ abstract setAccount(account: AccountEntity): void;
43
+ /**
44
+ * remove account entity from the platform cache if it's outdated
45
+ */
46
+ abstract removeOutdatedAccount(accountKey: string): void;
47
+ /**
48
+ * fetch the idToken entity from the platform cache
49
+ * @param idTokenKey
50
+ */
51
+ abstract getIdTokenCredential(idTokenKey: string): IdTokenEntity | null;
52
+ /**
53
+ * set idToken entity to the platform cache
54
+ * @param idToken
55
+ */
56
+ abstract setIdTokenCredential(idToken: IdTokenEntity): void;
57
+ /**
58
+ * fetch the idToken entity from the platform cache
59
+ * @param accessTokenKey
60
+ */
61
+ abstract getAccessTokenCredential(accessTokenKey: string): AccessTokenEntity | null;
62
+ /**
63
+ * set idToken entity to the platform cache
64
+ * @param accessToken
65
+ */
66
+ abstract setAccessTokenCredential(accessToken: AccessTokenEntity): void;
67
+ /**
68
+ * fetch the idToken entity from the platform cache
69
+ * @param refreshTokenKey
70
+ */
71
+ abstract getRefreshTokenCredential(refreshTokenKey: string): RefreshTokenEntity | null;
72
+ /**
73
+ * set idToken entity to the platform cache
74
+ * @param refreshToken
75
+ */
76
+ abstract setRefreshTokenCredential(refreshToken: RefreshTokenEntity): void;
77
+ /**
78
+ * fetch appMetadata entity from the platform cache
79
+ * @param appMetadataKey
80
+ */
81
+ abstract getAppMetadata(appMetadataKey: string): AppMetadataEntity | null;
82
+ /**
83
+ * set appMetadata entity to the platform cache
84
+ * @param appMetadata
85
+ */
86
+ abstract setAppMetadata(appMetadata: AppMetadataEntity): void;
87
+ /**
88
+ * fetch server telemetry entity from the platform cache
89
+ * @param serverTelemetryKey
90
+ */
91
+ abstract getServerTelemetry(serverTelemetryKey: string): ServerTelemetryEntity | null;
92
+ /**
93
+ * set server telemetry entity to the platform cache
94
+ * @param serverTelemetryKey
95
+ * @param serverTelemetry
96
+ */
97
+ abstract setServerTelemetry(serverTelemetryKey: string, serverTelemetry: ServerTelemetryEntity): void;
98
+ /**
99
+ * fetch cloud discovery metadata entity from the platform cache
100
+ * @param key
101
+ */
102
+ abstract getAuthorityMetadata(key: string): AuthorityMetadataEntity | null;
103
+ /**
104
+ *
105
+ */
106
+ abstract getAuthorityMetadataKeys(): Array<string>;
107
+ /**
108
+ * set cloud discovery metadata entity to the platform cache
109
+ * @param key
110
+ * @param value
111
+ */
112
+ abstract setAuthorityMetadata(key: string, value: AuthorityMetadataEntity): void;
113
+ /**
114
+ * fetch throttling entity from the platform cache
115
+ * @param throttlingCacheKey
116
+ */
117
+ abstract getThrottlingCache(throttlingCacheKey: string): ThrottlingEntity | null;
118
+ /**
119
+ * set throttling entity to the platform cache
120
+ * @param throttlingCacheKey
121
+ * @param throttlingCache
122
+ */
123
+ abstract setThrottlingCache(throttlingCacheKey: string, throttlingCache: ThrottlingEntity): void;
124
+ /**
125
+ * Function to remove an item from cache given its key.
126
+ * @param key
127
+ */
128
+ abstract removeItem(key: string): void;
129
+ /**
130
+ * Function which retrieves all current keys from the cache.
131
+ */
132
+ abstract getKeys(): string[];
133
+ /**
134
+ * Function which retrieves all account keys from the cache
135
+ */
136
+ abstract getAccountKeys(): string[];
137
+ /**
138
+ * Function which retrieves all token keys from the cache
139
+ */
140
+ abstract getTokenKeys(): TokenKeys;
141
+ /**
142
+ * Function which updates an outdated credential cache key
143
+ */
144
+ abstract updateCredentialCacheKey(currentCacheKey: string, credential: ValidCredentialType): string;
145
+ /**
146
+ * Returns all the accounts in the cache that match the optional filter. If no filter is provided, all accounts are returned.
147
+ * @param accountFilter - (Optional) filter to narrow down the accounts returned
148
+ * @returns Array of AccountInfo objects in cache
149
+ */
150
+ getAllAccounts(accountFilter?: AccountFilter): AccountInfo[];
151
+ /**
152
+ * Gets first tenanted AccountInfo object found based on provided filters
153
+ */
154
+ getAccountInfoFilteredBy(accountFilter: AccountFilter): AccountInfo | null;
155
+ /**
156
+ * Returns a single matching
157
+ * @param accountFilter
158
+ * @returns
159
+ */
160
+ getBaseAccountInfo(accountFilter: AccountFilter): AccountInfo | null;
161
+ /**
162
+ * Matches filtered account entities with cached ID tokens that match the tenant profile-specific account filters
163
+ * and builds the account info objects from the matching ID token's claims
164
+ * @param cachedAccounts
165
+ * @param accountFilter
166
+ * @returns Array of AccountInfo objects that match account and tenant profile filters
167
+ */
168
+ private buildTenantProfiles;
169
+ private getTenantedAccountInfoByFilter;
170
+ private getTenantProfilesFromAccountEntity;
171
+ private tenantProfileMatchesFilter;
172
+ private idTokenClaimsMatchTenantProfileFilter;
173
+ /**
174
+ * saves a cache record
175
+ * @param cacheRecord {CacheRecord}
176
+ * @param storeInCache {?StoreInCache}
177
+ * @param correlationId {?string} correlation id
178
+ */
179
+ saveCacheRecord(cacheRecord: CacheRecord, storeInCache?: StoreInCache, correlationId?: string): Promise<void>;
180
+ /**
181
+ * saves access token credential
182
+ * @param credential
183
+ */
184
+ private saveAccessToken;
185
+ /**
186
+ * Retrieve account entities matching all provided tenant-agnostic filters; if no filter is set, get all account entities in the cache
187
+ * Not checking for casing as keys are all generated in lower case, remember to convert to lower case if object properties are compared
188
+ * @param accountFilter - An object containing Account properties to filter by
189
+ */
190
+ getAccountsFilteredBy(accountFilter: AccountFilter): AccountEntity[];
191
+ /**
192
+ * Returns true if the given key matches our account key schema. Also matches homeAccountId and/or tenantId if provided
193
+ * @param key
194
+ * @param homeAccountId
195
+ * @param tenantId
196
+ * @returns
197
+ */
198
+ isAccountKey(key: string, homeAccountId?: string, tenantId?: string): boolean;
199
+ /**
200
+ * Returns true if the given key matches our credential key schema.
201
+ * @param key
202
+ */
203
+ isCredentialKey(key: string): boolean;
204
+ /**
205
+ * Returns whether or not the given credential entity matches the filter
206
+ * @param entity
207
+ * @param filter
208
+ * @returns
209
+ */
210
+ credentialMatchesFilter(entity: ValidCredentialType, filter: CredentialFilter): boolean;
211
+ /**
212
+ * retrieve appMetadata matching all provided filters; if no filter is set, get all appMetadata
213
+ * @param filter
214
+ */
215
+ getAppMetadataFilteredBy(filter: AppMetadataFilter): AppMetadataCache;
216
+ /**
217
+ * retrieve authorityMetadata that contains a matching alias
218
+ * @param filter
219
+ */
220
+ getAuthorityMetadataByAlias(host: string): AuthorityMetadataEntity | null;
221
+ /**
222
+ * Removes all accounts and related tokens from cache.
223
+ */
224
+ removeAllAccounts(): Promise<void>;
225
+ /**
226
+ * Removes the account and related tokens for a given account key
227
+ * @param account
228
+ */
229
+ removeAccount(accountKey: string): Promise<void>;
230
+ /**
231
+ * Removes credentials associated with the provided account
232
+ * @param account
233
+ */
234
+ removeAccountContext(account: AccountEntity): Promise<void>;
235
+ /**
236
+ * Migrates a single-tenant account and all it's associated alternate cross-tenant account objects in the
237
+ * cache into a condensed multi-tenant account object with tenant profiles.
238
+ * @param accountKey
239
+ * @param accountEntity
240
+ * @param logger
241
+ * @returns
242
+ */
243
+ protected updateOutdatedCachedAccount(accountKey: string, accountEntity: AccountEntity | null, logger?: Logger): AccountEntity | null;
244
+ /**
245
+ * returns a boolean if the given credential is removed
246
+ * @param credential
247
+ */
248
+ removeAccessToken(key: string): Promise<void>;
249
+ /**
250
+ * Removes all app metadata objects from cache.
251
+ */
252
+ removeAppMetadata(): boolean;
253
+ /**
254
+ * Retrieve AccountEntity from cache
255
+ * @param account
256
+ */
257
+ readAccountFromCache(account: AccountInfo): AccountEntity | null;
258
+ /**
259
+ * Retrieve IdTokenEntity from cache
260
+ * @param account {AccountInfo}
261
+ * @param tokenKeys {?TokenKeys}
262
+ * @param targetRealm {?string}
263
+ * @param performanceClient {?IPerformanceClient}
264
+ * @param correlationId {?string}
265
+ */
266
+ getIdToken(account: AccountInfo, tokenKeys?: TokenKeys, targetRealm?: string, performanceClient?: IPerformanceClient, correlationId?: string): IdTokenEntity | null;
267
+ /**
268
+ * Gets all idTokens matching the given filter
269
+ * @param filter
270
+ * @returns
271
+ */
272
+ getIdTokensByFilter(filter: CredentialFilter, tokenKeys?: TokenKeys): Map<string, IdTokenEntity>;
273
+ /**
274
+ * Validate the cache key against filter before retrieving and parsing cache value
275
+ * @param key
276
+ * @param filter
277
+ * @returns
278
+ */
279
+ idTokenKeyMatchesFilter(inputKey: string, filter: CredentialFilter): boolean;
280
+ /**
281
+ * Removes idToken from the cache
282
+ * @param key
283
+ */
284
+ removeIdToken(key: string): void;
285
+ /**
286
+ * Removes refresh token from the cache
287
+ * @param key
288
+ */
289
+ removeRefreshToken(key: string): void;
290
+ /**
291
+ * Retrieve AccessTokenEntity from cache
292
+ * @param account {AccountInfo}
293
+ * @param request {BaseAuthRequest}
294
+ * @param tokenKeys {?TokenKeys}
295
+ * @param performanceClient {?IPerformanceClient}
296
+ * @param correlationId {?string}
297
+ */
298
+ getAccessToken(account: AccountInfo, request: BaseAuthRequest, tokenKeys?: TokenKeys, targetRealm?: string, performanceClient?: IPerformanceClient, correlationId?: string): AccessTokenEntity | null;
299
+ /**
300
+ * Validate the cache key against filter before retrieving and parsing cache value
301
+ * @param key
302
+ * @param filter
303
+ * @param keyMustContainAllScopes
304
+ * @returns
305
+ */
306
+ accessTokenKeyMatchesFilter(inputKey: string, filter: CredentialFilter, keyMustContainAllScopes: boolean): boolean;
307
+ /**
308
+ * Gets all access tokens matching the filter
309
+ * @param filter
310
+ * @returns
311
+ */
312
+ getAccessTokensByFilter(filter: CredentialFilter): AccessTokenEntity[];
313
+ /**
314
+ * Helper to retrieve the appropriate refresh token from cache
315
+ * @param account {AccountInfo}
316
+ * @param familyRT {boolean}
317
+ * @param tokenKeys {?TokenKeys}
318
+ * @param performanceClient {?IPerformanceClient}
319
+ * @param correlationId {?string}
320
+ */
321
+ getRefreshToken(account: AccountInfo, familyRT: boolean, tokenKeys?: TokenKeys, performanceClient?: IPerformanceClient, correlationId?: string): RefreshTokenEntity | null;
322
+ /**
323
+ * Validate the cache key against filter before retrieving and parsing cache value
324
+ * @param key
325
+ * @param filter
326
+ */
327
+ refreshTokenKeyMatchesFilter(inputKey: string, filter: CredentialFilter): boolean;
328
+ /**
329
+ * Retrieve AppMetadataEntity from cache
330
+ */
331
+ readAppMetadataFromCache(environment: string): AppMetadataEntity | null;
332
+ /**
333
+ * Return the family_id value associated with FOCI
334
+ * @param environment
335
+ * @param clientId
336
+ */
337
+ isAppMetadataFOCI(environment: string): boolean;
338
+ /**
339
+ * helper to match account ids
340
+ * @param value
341
+ * @param homeAccountId
342
+ */
343
+ private matchHomeAccountId;
344
+ /**
345
+ * helper to match account ids
346
+ * @param entity
347
+ * @param localAccountId
348
+ * @returns
349
+ */
350
+ private matchLocalAccountIdFromTokenClaims;
351
+ private matchLocalAccountIdFromTenantProfile;
352
+ /**
353
+ * helper to match names
354
+ * @param entity
355
+ * @param name
356
+ * @returns true if the downcased name properties are present and match in the filter and the entity
357
+ */
358
+ private matchName;
359
+ /**
360
+ * helper to match usernames
361
+ * @param entity
362
+ * @param username
363
+ * @returns
364
+ */
365
+ private matchUsername;
366
+ /**
367
+ * helper to match assertion
368
+ * @param value
369
+ * @param oboAssertion
370
+ */
371
+ private matchUserAssertionHash;
372
+ /**
373
+ * helper to match environment
374
+ * @param value
375
+ * @param environment
376
+ */
377
+ private matchEnvironment;
378
+ /**
379
+ * helper to match credential type
380
+ * @param entity
381
+ * @param credentialType
382
+ */
383
+ private matchCredentialType;
384
+ /**
385
+ * helper to match client ids
386
+ * @param entity
387
+ * @param clientId
388
+ */
389
+ private matchClientId;
390
+ /**
391
+ * helper to match family ids
392
+ * @param entity
393
+ * @param familyId
394
+ */
395
+ private matchFamilyId;
396
+ /**
397
+ * helper to match realm
398
+ * @param entity
399
+ * @param realm
400
+ */
401
+ private matchRealm;
402
+ /**
403
+ * helper to match nativeAccountId
404
+ * @param entity
405
+ * @param nativeAccountId
406
+ * @returns boolean indicating the match result
407
+ */
408
+ private matchNativeAccountId;
409
+ /**
410
+ * helper to match loginHint which can be either:
411
+ * 1. login_hint ID token claim
412
+ * 2. username in cached account object
413
+ * 3. upn in ID token claims
414
+ * @param entity
415
+ * @param loginHint
416
+ * @returns
417
+ */
418
+ private matchLoginHintFromTokenClaims;
419
+ /**
420
+ * Helper to match sid
421
+ * @param entity
422
+ * @param sid
423
+ * @returns true if the sid claim is present and matches the filter
424
+ */
425
+ private matchSid;
426
+ private matchAuthorityType;
427
+ /**
428
+ * Returns true if the target scopes are a subset of the current entity's scopes, false otherwise.
429
+ * @param entity
430
+ * @param target
431
+ */
432
+ private matchTarget;
433
+ /**
434
+ * Returns true if the credential's tokenType or Authentication Scheme matches the one in the request, false otherwise
435
+ * @param entity
436
+ * @param tokenType
437
+ */
438
+ private matchTokenType;
439
+ /**
440
+ * Returns true if the credential's keyId matches the one in the request, false otherwise
441
+ * @param entity
442
+ * @param keyId
443
+ */
444
+ private matchKeyId;
445
+ /**
446
+ * returns if a given cache entity is of the type appmetadata
447
+ * @param key
448
+ */
449
+ private isAppMetadata;
450
+ /**
451
+ * returns if a given cache entity is of the type authoritymetadata
452
+ * @param key
453
+ */
454
+ protected isAuthorityMetadata(key: string): boolean;
455
+ /**
456
+ * returns cache key used for cloud instance metadata
457
+ */
458
+ generateAuthorityMetadataCacheKey(authority: string): string;
459
+ /**
460
+ * Helper to convert serialized data to object
461
+ * @param obj
462
+ * @param json
463
+ */
464
+ static toObject<T>(obj: T, json: object): T;
465
+ }
466
+ /** @internal */
467
+ export declare class DefaultStorageClass extends CacheManager {
468
+ setAccount(): void;
469
+ getAccount(): AccountEntity;
470
+ getCachedAccountEntity(): AccountEntity | null;
471
+ setIdTokenCredential(): void;
472
+ getIdTokenCredential(): IdTokenEntity;
473
+ setAccessTokenCredential(): void;
474
+ getAccessTokenCredential(): AccessTokenEntity;
475
+ setRefreshTokenCredential(): void;
476
+ getRefreshTokenCredential(): RefreshTokenEntity;
477
+ setAppMetadata(): void;
478
+ getAppMetadata(): AppMetadataEntity;
479
+ setServerTelemetry(): void;
480
+ getServerTelemetry(): ServerTelemetryEntity;
481
+ setAuthorityMetadata(): void;
482
+ getAuthorityMetadata(): AuthorityMetadataEntity | null;
483
+ getAuthorityMetadataKeys(): Array<string>;
484
+ setThrottlingCache(): void;
485
+ getThrottlingCache(): ThrottlingEntity;
486
+ removeItem(): boolean;
487
+ getKeys(): string[];
488
+ getAccountKeys(): string[];
489
+ getTokenKeys(): TokenKeys;
490
+ updateCredentialCacheKey(): string;
491
+ removeOutdatedAccount(): void;
492
+ }
493
+ //# sourceMappingURL=CacheManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CacheManager.d.ts","sourceRoot":"","sources":["../../../src/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MAAM;IAI5D;;;;OAIG;IACH,MAAM,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC;CAM9C;AAED,gBAAgB;AAChB,qBAAa,mBAAoB,SAAQ,YAAY;IACjD,UAAU,IAAI,IAAI;IAGlB,UAAU,IAAI,aAAa;IAG3B,sBAAsB,IAAI,aAAa,GAAG,IAAI;IAG9C,oBAAoB,IAAI,IAAI;IAG5B,oBAAoB,IAAI,aAAa;IAGrC,wBAAwB,IAAI,IAAI;IAGhC,wBAAwB,IAAI,iBAAiB;IAG7C,yBAAyB,IAAI,IAAI;IAGjC,yBAAyB,IAAI,kBAAkB;IAG/C,cAAc,IAAI,IAAI;IAGtB,cAAc,IAAI,iBAAiB;IAGnC,kBAAkB,IAAI,IAAI;IAG1B,kBAAkB,IAAI,qBAAqB;IAG3C,oBAAoB,IAAI,IAAI;IAG5B,oBAAoB,IAAI,uBAAuB,GAAG,IAAI;IAGtD,wBAAwB,IAAI,KAAK,CAAC,MAAM,CAAC;IAGzC,kBAAkB,IAAI,IAAI;IAG1B,kBAAkB,IAAI,gBAAgB;IAGtC,UAAU,IAAI,OAAO;IAGrB,OAAO,IAAI,MAAM,EAAE;IAGnB,cAAc,IAAI,MAAM,EAAE;IAG1B,YAAY,IAAI,SAAS;IAGzB,wBAAwB,IAAI,MAAM;IAGlC,qBAAqB,IAAI,IAAI;CAGhC"}
@@ -0,0 +1,26 @@
1
+ import { CredentialEntity } from "./CredentialEntity.js";
2
+ import { AuthenticationScheme } from "../../utils/Constants.js";
3
+ /**
4
+ * Access token cache type
5
+ */
6
+ export type AccessTokenEntity = CredentialEntity & {
7
+ /** Full tenant or organizational identifier that the account belongs to */
8
+ realm: string;
9
+ /** Permissions that are included in the token, or for refresh tokens, the resource identifier. */
10
+ target: string;
11
+ /** Absolute device time when entry was created in the cache. */
12
+ cachedAt: string;
13
+ /** Token expiry time, calculated based on current UTC time in seconds. Represented as a string. */
14
+ expiresOn: string;
15
+ /** Additional extended expiry time until when token is valid in case of server-side outage. Represented as string in UTC seconds. */
16
+ extendedExpiresOn?: string;
17
+ /** Used for proactive refresh */
18
+ refreshOn?: string;
19
+ /** Matches the authentication scheme for which the token was issued (i.e. Bearer or pop) */
20
+ tokenType?: AuthenticationScheme;
21
+ /** Stringified claims object */
22
+ requestedClaims?: string;
23
+ /** Matches the SHA 256 hash of the claims object included in the token request */
24
+ requestedClaimsHash?: string;
25
+ };
26
+ //# sourceMappingURL=AccessTokenEntity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AccessTokenEntity.d.ts","sourceRoot":"","sources":["../../../../src/cache/entities/AccessTokenEntity.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,gBAAgB,GAAG;IAC/C,2EAA2E;IAC3E,KAAK,EAAE,MAAM,CAAC;IACd,kGAAkG;IAClG,MAAM,EAAE,MAAM,CAAC;IACf,gEAAgE;IAChE,QAAQ,EAAE,MAAM,CAAC;IACjB,mGAAmG;IACnG,SAAS,EAAE,MAAM,CAAC;IAClB,qIAAqI;IACrI,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,iCAAiC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4FAA4F;IAC5F,SAAS,CAAC,EAAE,oBAAoB,CAAC;IACjC,gCAAgC;IAChC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,kFAAkF;IAClF,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAChC,CAAC"}
@@ -0,0 +1,107 @@
1
+ import { Authority } from "../../authority/Authority.js";
2
+ import { ICrypto } from "../../crypto/ICrypto.js";
3
+ import { AccountInfo, TenantProfile } from "../../account/AccountInfo.js";
4
+ import { AuthorityType } from "../../authority/AuthorityType.js";
5
+ import { Logger } from "../../logger/Logger.js";
6
+ import { TokenClaims } from "../../account/TokenClaims.js";
7
+ /**
8
+ * Type that defines required and optional parameters for an Account field (based on universal cache schema implemented by all MSALs).
9
+ *
10
+ * Key : Value Schema
11
+ *
12
+ * Key: <home_account_id>-<environment>-<realm*>
13
+ *
14
+ * Value Schema:
15
+ * {
16
+ * homeAccountId: home account identifier for the auth scheme,
17
+ * environment: entity that issued the token, represented as a full host
18
+ * realm: Full tenant or organizational identifier that the account belongs to
19
+ * localAccountId: Original tenant-specific accountID, usually used for legacy cases
20
+ * username: primary username that represents the user, usually corresponds to preferred_username in the v2 endpt
21
+ * authorityType: Accounts authority type as a string
22
+ * name: Full name for the account, including given name and family name,
23
+ * lastModificationTime: last time this entity was modified in the cache
24
+ * lastModificationApp:
25
+ * nativeAccountId: Account identifier on the native device
26
+ * tenantProfiles: Array of tenant profile objects for each tenant that the account has authenticated with in the browser
27
+ * }
28
+ * @internal
29
+ */
30
+ export declare class AccountEntity {
31
+ homeAccountId: string;
32
+ environment: string;
33
+ realm: string;
34
+ localAccountId: string;
35
+ username: string;
36
+ authorityType: string;
37
+ clientInfo?: string;
38
+ name?: string;
39
+ lastModificationTime?: string;
40
+ lastModificationApp?: string;
41
+ cloudGraphHostName?: string;
42
+ msGraphHost?: string;
43
+ nativeAccountId?: string;
44
+ tenantProfiles?: Array<TenantProfile>;
45
+ /**
46
+ * Generate Account Id key component as per the schema: <home_account_id>-<environment>
47
+ */
48
+ generateAccountId(): string;
49
+ /**
50
+ * Generate Account Cache Key as per the schema: <home_account_id>-<environment>-<realm*>
51
+ */
52
+ generateAccountKey(): string;
53
+ /**
54
+ * Returns the AccountInfo interface for this account.
55
+ */
56
+ getAccountInfo(): AccountInfo;
57
+ /**
58
+ * Returns true if the account entity is in single tenant format (outdated), false otherwise
59
+ */
60
+ isSingleTenant(): boolean;
61
+ /**
62
+ * Generates account key from interface
63
+ * @param accountInterface
64
+ */
65
+ static generateAccountCacheKey(accountInterface: AccountInfo): string;
66
+ /**
67
+ * Build Account cache from IdToken, clientInfo and authority/policy. Associated with AAD.
68
+ * @param accountDetails
69
+ */
70
+ static createAccount(accountDetails: {
71
+ homeAccountId: string;
72
+ idTokenClaims?: TokenClaims;
73
+ clientInfo?: string;
74
+ cloudGraphHostName?: string;
75
+ msGraphHost?: string;
76
+ environment?: string;
77
+ nativeAccountId?: string;
78
+ tenantProfiles?: Array<TenantProfile>;
79
+ }, authority: Authority, base64Decode?: (input: string) => string): AccountEntity;
80
+ /**
81
+ * Creates an AccountEntity object from AccountInfo
82
+ * @param accountInfo
83
+ * @param cloudGraphHostName
84
+ * @param msGraphHost
85
+ * @returns
86
+ */
87
+ static createFromAccountInfo(accountInfo: AccountInfo, cloudGraphHostName?: string, msGraphHost?: string): AccountEntity;
88
+ /**
89
+ * Generate HomeAccountId from server response
90
+ * @param serverClientInfo
91
+ * @param authType
92
+ */
93
+ static generateHomeAccountId(serverClientInfo: string, authType: AuthorityType, logger: Logger, cryptoObj: ICrypto, idTokenClaims?: TokenClaims): string;
94
+ /**
95
+ * Validates an entity: checks for all expected params
96
+ * @param entity
97
+ */
98
+ static isAccountEntity(entity: object): boolean;
99
+ /**
100
+ * Helper function to determine whether 2 accountInfo objects represent the same account
101
+ * @param accountA
102
+ * @param accountB
103
+ * @param compareClaims - If set to true idTokenClaims will also be compared to determine account equality
104
+ */
105
+ static accountInfoIsEqual(accountA: AccountInfo | null, accountB: AccountInfo | null, compareClaims?: boolean): boolean;
106
+ }
107
+ //# sourceMappingURL=AccountEntity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AccountEntity.d.ts","sourceRoot":"","sources":["../../../../src/cache/entities/AccountEntity.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAElD,OAAO,EACH,WAAW,EACX,aAAa,EAEhB,MAAM,8BAA8B,CAA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,EAAE,MAAM,CAAC;QACzB,cAAc,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC;KACzC,EACD,SAAS,EAAE,SAAS,EACpB,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,GACzC,aAAa;IAiFhB;;;;;;OAMG;IACH,MAAM,CAAC,qBAAqB,CACxB,WAAW,EAAE,WAAW,EACxB,kBAAkB,CAAC,EAAE,MAAM,EAC3B,WAAW,CAAC,EAAE,MAAM,GACrB,aAAa;IAyBhB;;;;OAIG;IACH,MAAM,CAAC,qBAAqB,CACxB,gBAAgB,EAAE,MAAM,EACxB,QAAQ,EAAE,aAAa,EACvB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,OAAO,EAClB,aAAa,CAAC,EAAE,WAAW,GAC5B,MAAM;IA2BT;;;OAGG;IACH,MAAM,CAAC,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO;IAe/C;;;;;OAKG;IACH,MAAM,CAAC,kBAAkB,CACrB,QAAQ,EAAE,WAAW,GAAG,IAAI,EAC5B,QAAQ,EAAE,WAAW,GAAG,IAAI,EAC5B,aAAa,CAAC,EAAE,OAAO,GACxB,OAAO;CA4Bb"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * App Metadata Cache Type
3
+ */
4
+ export type AppMetadataEntity = {
5
+ /** clientId of the application */
6
+ clientId: string;
7
+ /** entity that issued the token, represented as a full host */
8
+ environment: string;
9
+ /** Family identifier, '1' represents Microsoft Family */
10
+ familyId?: string;
11
+ };
12
+ //# sourceMappingURL=AppMetadataEntity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AppMetadataEntity.d.ts","sourceRoot":"","sources":["../../../../src/cache/entities/AppMetadataEntity.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC5B,kCAAkC;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,+DAA+D;IAC/D,WAAW,EAAE,MAAM,CAAC;IACpB,yDAAyD;IACzD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC"}
@@ -0,0 +1,16 @@
1
+ /** @internal */
2
+ export type AuthorityMetadataEntity = {
3
+ aliases: Array<string>;
4
+ preferred_cache: string;
5
+ preferred_network: string;
6
+ canonical_authority: string;
7
+ authorization_endpoint: string;
8
+ token_endpoint: string;
9
+ end_session_endpoint?: string;
10
+ issuer: string;
11
+ aliasesFromNetwork: boolean;
12
+ endpointsFromNetwork: boolean;
13
+ expiresAt: number;
14
+ jwks_uri: string;
15
+ };
16
+ //# sourceMappingURL=AuthorityMetadataEntity.d.ts.map