@azure/msal-common 14.14.1 → 14.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (562) hide show
  1. package/browser/README.md +1 -0
  2. package/browser/package.json +5 -0
  3. package/dist/account/AccountInfo.d.ts +1 -1
  4. package/dist/account/AccountInfo.d.ts.map +1 -1
  5. package/dist/account/AccountInfo.mjs +1 -1
  6. package/dist/account/AuthToken.d.ts +1 -1
  7. package/dist/account/AuthToken.d.ts.map +1 -1
  8. package/dist/account/AuthToken.mjs +1 -1
  9. package/dist/account/CcsCredential.mjs +1 -1
  10. package/dist/account/ClientInfo.mjs +1 -1
  11. package/dist/account/TokenClaims.mjs +1 -1
  12. package/dist/authority/Authority.d.ts +12 -12
  13. package/dist/authority/Authority.d.ts.map +1 -1
  14. package/dist/authority/Authority.mjs +1 -1
  15. package/dist/authority/AuthorityFactory.d.ts +6 -6
  16. package/dist/authority/AuthorityFactory.d.ts.map +1 -1
  17. package/dist/authority/AuthorityFactory.mjs +1 -1
  18. package/dist/authority/AuthorityMetadata.d.ts +6 -6
  19. package/dist/authority/AuthorityMetadata.d.ts.map +1 -1
  20. package/dist/authority/AuthorityMetadata.mjs +1 -1
  21. package/dist/authority/AuthorityOptions.d.ts +4 -4
  22. package/dist/authority/AuthorityOptions.d.ts.map +1 -1
  23. package/dist/authority/AuthorityOptions.mjs +1 -1
  24. package/dist/authority/AuthorityType.mjs +1 -1
  25. package/dist/authority/AzureRegionConfiguration.d.ts +1 -1
  26. package/dist/authority/AzureRegionConfiguration.d.ts.map +1 -1
  27. package/dist/authority/CloudInstanceDiscoveryErrorResponse.mjs +1 -1
  28. package/dist/authority/CloudInstanceDiscoveryResponse.d.ts +1 -1
  29. package/dist/authority/CloudInstanceDiscoveryResponse.d.ts.map +1 -1
  30. package/dist/authority/CloudInstanceDiscoveryResponse.mjs +1 -1
  31. package/dist/authority/OIDCOptions.d.ts +1 -1
  32. package/dist/authority/OIDCOptions.d.ts.map +1 -1
  33. package/dist/authority/OpenIdConfigResponse.mjs +1 -1
  34. package/dist/authority/ProtocolMode.mjs +1 -1
  35. package/dist/authority/RegionDiscovery.d.ts +5 -5
  36. package/dist/authority/RegionDiscovery.d.ts.map +1 -1
  37. package/dist/authority/RegionDiscovery.mjs +1 -1
  38. package/dist/authority/RegionDiscoveryMetadata.d.ts +1 -1
  39. package/dist/authority/RegionDiscoveryMetadata.d.ts.map +1 -1
  40. package/dist/broker/nativeBroker/INativeBrokerPlugin.d.ts +6 -6
  41. package/dist/broker/nativeBroker/INativeBrokerPlugin.d.ts.map +1 -1
  42. package/dist/cache/CacheManager.d.ts +18 -18
  43. package/dist/cache/CacheManager.d.ts.map +1 -1
  44. package/dist/cache/CacheManager.mjs +1 -1
  45. package/dist/cache/entities/AccessTokenEntity.d.ts +2 -2
  46. package/dist/cache/entities/AccessTokenEntity.d.ts.map +1 -1
  47. package/dist/cache/entities/AccountEntity.d.ts +6 -6
  48. package/dist/cache/entities/AccountEntity.d.ts.map +1 -1
  49. package/dist/cache/entities/AccountEntity.mjs +1 -1
  50. package/dist/cache/entities/CacheRecord.d.ts +5 -5
  51. package/dist/cache/entities/CacheRecord.d.ts.map +1 -1
  52. package/dist/cache/entities/CredentialEntity.d.ts +1 -1
  53. package/dist/cache/entities/CredentialEntity.d.ts.map +1 -1
  54. package/dist/cache/entities/IdTokenEntity.d.ts +1 -1
  55. package/dist/cache/entities/IdTokenEntity.d.ts.map +1 -1
  56. package/dist/cache/entities/RefreshTokenEntity.d.ts +1 -1
  57. package/dist/cache/entities/RefreshTokenEntity.d.ts.map +1 -1
  58. package/dist/cache/interface/ICacheManager.d.ts +12 -12
  59. package/dist/cache/interface/ICacheManager.d.ts.map +1 -1
  60. package/dist/cache/interface/ICachePlugin.d.ts +1 -1
  61. package/dist/cache/interface/ICachePlugin.d.ts.map +1 -1
  62. package/dist/cache/persistence/TokenCacheContext.d.ts +1 -1
  63. package/dist/cache/persistence/TokenCacheContext.d.ts.map +1 -1
  64. package/dist/cache/persistence/TokenCacheContext.mjs +1 -1
  65. package/dist/cache/utils/CacheHelpers.d.ts +9 -9
  66. package/dist/cache/utils/CacheHelpers.d.ts.map +1 -1
  67. package/dist/cache/utils/CacheHelpers.mjs +1 -1
  68. package/dist/cache/utils/CacheTypes.d.ts +11 -11
  69. package/dist/cache/utils/CacheTypes.d.ts.map +1 -1
  70. package/dist/client/AuthorizationCodeClient.d.ts +10 -9
  71. package/dist/client/AuthorizationCodeClient.d.ts.map +1 -1
  72. package/dist/client/AuthorizationCodeClient.mjs +13 -5
  73. package/dist/client/AuthorizationCodeClient.mjs.map +1 -1
  74. package/dist/client/BaseClient.d.ts +13 -13
  75. package/dist/client/BaseClient.d.ts.map +1 -1
  76. package/dist/client/BaseClient.mjs +1 -1
  77. package/dist/client/RefreshTokenClient.d.ts +6 -6
  78. package/dist/client/RefreshTokenClient.d.ts.map +1 -1
  79. package/dist/client/RefreshTokenClient.mjs +1 -1
  80. package/dist/client/SilentFlowClient.d.ts +6 -6
  81. package/dist/client/SilentFlowClient.d.ts.map +1 -1
  82. package/dist/client/SilentFlowClient.mjs +1 -1
  83. package/dist/config/ClientConfiguration.d.ts +13 -11
  84. package/dist/config/ClientConfiguration.d.ts.map +1 -1
  85. package/dist/config/ClientConfiguration.mjs +2 -1
  86. package/dist/config/ClientConfiguration.mjs.map +1 -1
  87. package/dist/constants/AADServerParamKeys.mjs +1 -1
  88. package/dist/crypto/ICrypto.d.ts +2 -2
  89. package/dist/crypto/ICrypto.d.ts.map +1 -1
  90. package/dist/crypto/ICrypto.mjs +1 -1
  91. package/dist/crypto/JoseHeader.d.ts +1 -1
  92. package/dist/crypto/JoseHeader.d.ts.map +1 -1
  93. package/dist/crypto/JoseHeader.mjs +1 -1
  94. package/dist/crypto/PopTokenGenerator.d.ts +3 -3
  95. package/dist/crypto/PopTokenGenerator.d.ts.map +1 -1
  96. package/dist/crypto/PopTokenGenerator.mjs +1 -1
  97. package/dist/crypto/SignedHttpRequest.d.ts +1 -1
  98. package/dist/crypto/SignedHttpRequest.d.ts.map +1 -1
  99. package/dist/error/AuthError.d.ts +1 -1
  100. package/dist/error/AuthError.d.ts.map +1 -1
  101. package/dist/error/AuthError.mjs +1 -1
  102. package/dist/error/AuthErrorCodes.mjs +1 -1
  103. package/dist/error/CacheError.d.ts +1 -1
  104. package/dist/error/CacheError.d.ts.map +1 -1
  105. package/dist/error/CacheError.mjs +1 -1
  106. package/dist/error/CacheErrorCodes.mjs +1 -1
  107. package/dist/error/ClientAuthError.d.ts +2 -2
  108. package/dist/error/ClientAuthError.d.ts.map +1 -1
  109. package/dist/error/ClientAuthError.mjs +1 -1
  110. package/dist/error/ClientAuthErrorCodes.mjs +1 -1
  111. package/dist/error/ClientConfigurationError.d.ts +2 -2
  112. package/dist/error/ClientConfigurationError.d.ts.map +1 -1
  113. package/dist/error/ClientConfigurationError.mjs +1 -1
  114. package/dist/error/ClientConfigurationErrorCodes.mjs +1 -1
  115. package/dist/error/InteractionRequiredAuthError.d.ts +2 -2
  116. package/dist/error/InteractionRequiredAuthError.d.ts.map +1 -1
  117. package/dist/error/InteractionRequiredAuthError.mjs +1 -1
  118. package/dist/error/InteractionRequiredAuthErrorCodes.mjs +1 -1
  119. package/dist/error/JoseHeaderError.d.ts +2 -2
  120. package/dist/error/JoseHeaderError.d.ts.map +1 -1
  121. package/dist/error/JoseHeaderError.mjs +1 -1
  122. package/dist/error/JoseHeaderErrorCodes.mjs +1 -1
  123. package/dist/error/ServerError.d.ts +1 -1
  124. package/dist/error/ServerError.d.ts.map +1 -1
  125. package/dist/error/ServerError.mjs +1 -1
  126. package/dist/exports-browser-only.d.ts +10 -0
  127. package/dist/exports-browser-only.d.ts.map +1 -0
  128. package/dist/exports-common.d.ts +80 -0
  129. package/dist/exports-common.d.ts.map +1 -0
  130. package/dist/exports-node-only.d.ts +18 -0
  131. package/dist/exports-node-only.d.ts.map +1 -0
  132. package/dist/index-browser.d.ts +7 -0
  133. package/dist/index-browser.d.ts.map +1 -0
  134. package/dist/index-browser.mjs +67 -0
  135. package/dist/index-browser.mjs.map +1 -0
  136. package/dist/index-node.d.ts +7 -0
  137. package/dist/index-node.d.ts.map +1 -0
  138. package/dist/index-node.mjs +66 -0
  139. package/dist/index-node.mjs.map +1 -0
  140. package/dist/index.d.ts +7 -103
  141. package/dist/index.d.ts.map +1 -1
  142. package/dist/index.mjs +30 -30
  143. package/dist/logger/Logger.d.ts +1 -1
  144. package/dist/logger/Logger.d.ts.map +1 -1
  145. package/dist/logger/Logger.mjs +1 -1
  146. package/dist/network/INetworkModule.d.ts +1 -1
  147. package/dist/network/INetworkModule.d.ts.map +1 -1
  148. package/dist/network/INetworkModule.mjs +1 -1
  149. package/dist/network/NetworkManager.d.ts +4 -4
  150. package/dist/network/NetworkManager.d.ts.map +1 -1
  151. package/dist/network/NetworkManager.mjs +1 -1
  152. package/dist/network/RequestThumbprint.d.ts +2 -2
  153. package/dist/network/RequestThumbprint.d.ts.map +1 -1
  154. package/dist/network/ThrottlingUtils.d.ts +5 -5
  155. package/dist/network/ThrottlingUtils.d.ts.map +1 -1
  156. package/dist/network/ThrottlingUtils.mjs +1 -1
  157. package/dist/packageMetadata.d.ts +1 -1
  158. package/dist/packageMetadata.mjs +2 -2
  159. package/dist/request/AuthenticationHeaderParser.mjs +1 -1
  160. package/dist/request/BaseAuthRequest.d.ts +5 -5
  161. package/dist/request/BaseAuthRequest.d.ts.map +1 -1
  162. package/dist/request/CommonAuthorizationCodeRequest.d.ts +3 -3
  163. package/dist/request/CommonAuthorizationCodeRequest.d.ts.map +1 -1
  164. package/dist/request/CommonAuthorizationUrlRequest.d.ts +4 -4
  165. package/dist/request/CommonAuthorizationUrlRequest.d.ts.map +1 -1
  166. package/dist/request/CommonClientCredentialRequest.d.ts +3 -3
  167. package/dist/request/CommonClientCredentialRequest.d.ts.map +1 -1
  168. package/dist/request/CommonDeviceCodeRequest.d.ts +3 -3
  169. package/dist/request/CommonDeviceCodeRequest.d.ts.map +1 -1
  170. package/dist/request/CommonEndSessionRequest.d.ts +2 -2
  171. package/dist/request/CommonEndSessionRequest.d.ts.map +1 -1
  172. package/dist/request/CommonOnBehalfOfRequest.d.ts +1 -1
  173. package/dist/request/CommonOnBehalfOfRequest.d.ts.map +1 -1
  174. package/dist/request/CommonRefreshTokenRequest.d.ts +3 -3
  175. package/dist/request/CommonRefreshTokenRequest.d.ts.map +1 -1
  176. package/dist/request/CommonSilentFlowRequest.d.ts +3 -3
  177. package/dist/request/CommonSilentFlowRequest.d.ts.map +1 -1
  178. package/dist/request/CommonUsernamePasswordRequest.d.ts +1 -1
  179. package/dist/request/CommonUsernamePasswordRequest.d.ts.map +1 -1
  180. package/dist/request/NativeRequest.d.ts +1 -1
  181. package/dist/request/NativeRequest.d.ts.map +1 -1
  182. package/dist/request/RequestParameterBuilder.d.ts +5 -5
  183. package/dist/request/RequestParameterBuilder.d.ts.map +1 -1
  184. package/dist/request/RequestParameterBuilder.mjs +1 -1
  185. package/dist/request/RequestValidator.mjs +1 -1
  186. package/dist/request/ScopeSet.mjs +1 -1
  187. package/dist/response/AuthenticationResult.d.ts +1 -1
  188. package/dist/response/AuthenticationResult.d.ts.map +1 -1
  189. package/dist/response/ExternalTokenResponse.d.ts +1 -1
  190. package/dist/response/ExternalTokenResponse.d.ts.map +1 -1
  191. package/dist/response/ResponseHandler.d.ts +16 -16
  192. package/dist/response/ResponseHandler.d.ts.map +1 -1
  193. package/dist/response/ResponseHandler.mjs +1 -1
  194. package/dist/response/ServerAuthorizationTokenResponse.d.ts +1 -1
  195. package/dist/response/ServerAuthorizationTokenResponse.d.ts.map +1 -1
  196. package/dist/telemetry/performance/IPerformanceClient.d.ts +2 -2
  197. package/dist/telemetry/performance/IPerformanceClient.d.ts.map +1 -1
  198. package/dist/telemetry/performance/PerformanceClient.d.ts +5 -5
  199. package/dist/telemetry/performance/PerformanceClient.d.ts.map +1 -1
  200. package/dist/telemetry/performance/PerformanceClient.mjs +1 -1
  201. package/dist/telemetry/performance/PerformanceEvent.d.ts +0 -4
  202. package/dist/telemetry/performance/PerformanceEvent.d.ts.map +1 -1
  203. package/dist/telemetry/performance/PerformanceEvent.mjs +1 -5
  204. package/dist/telemetry/performance/PerformanceEvent.mjs.map +1 -1
  205. package/dist/telemetry/performance/StubPerformanceClient.d.ts +3 -3
  206. package/dist/telemetry/performance/StubPerformanceClient.d.ts.map +1 -1
  207. package/dist/telemetry/performance/StubPerformanceClient.mjs +1 -1
  208. package/dist/telemetry/performance/StubPerformanceClient.mjs.map +1 -1
  209. package/dist/telemetry/server/ServerTelemetryManager.d.ts +5 -5
  210. package/dist/telemetry/server/ServerTelemetryManager.d.ts.map +1 -1
  211. package/dist/telemetry/server/ServerTelemetryManager.mjs +1 -1
  212. package/dist/url/UrlString.d.ts +1 -1
  213. package/dist/url/UrlString.d.ts.map +1 -1
  214. package/dist/url/UrlString.mjs +1 -1
  215. package/dist/utils/ClientAssertionUtils.d.ts +1 -1
  216. package/dist/utils/ClientAssertionUtils.d.ts.map +1 -1
  217. package/dist/utils/ClientAssertionUtils.mjs +1 -1
  218. package/dist/utils/Constants.mjs +1 -1
  219. package/dist/utils/FunctionWrappers.d.ts +2 -2
  220. package/dist/utils/FunctionWrappers.d.ts.map +1 -1
  221. package/dist/utils/FunctionWrappers.mjs +1 -1
  222. package/dist/utils/ProtocolUtils.d.ts +1 -1
  223. package/dist/utils/ProtocolUtils.d.ts.map +1 -1
  224. package/dist/utils/ProtocolUtils.mjs +1 -1
  225. package/dist/utils/StringUtils.mjs +1 -1
  226. package/dist/utils/TimeUtils.mjs +1 -1
  227. package/dist/utils/UrlUtils.d.ts +1 -1
  228. package/dist/utils/UrlUtils.d.ts.map +1 -1
  229. package/dist/utils/UrlUtils.mjs +1 -1
  230. package/lib/index-browser.cjs +838 -0
  231. package/lib/index-browser.cjs.map +1 -0
  232. package/{dist/index.cjs → lib/index-node-aee3f7b6.js} +39 -769
  233. package/lib/index-node-aee3f7b6.js.map +1 -0
  234. package/lib/index-node.cjs +103 -0
  235. package/lib/index-node.cjs.map +1 -0
  236. package/lib/index.cjs +111 -0
  237. package/lib/index.cjs.map +1 -0
  238. package/lib/package.json +1 -0
  239. package/lib/types/account/AccountInfo.d.ts +67 -0
  240. package/lib/types/account/AccountInfo.d.ts.map +1 -0
  241. package/lib/types/account/AuthToken.d.ts +18 -0
  242. package/lib/types/account/AuthToken.d.ts.map +1 -0
  243. package/lib/types/account/CcsCredential.d.ts +10 -0
  244. package/lib/types/account/CcsCredential.d.ts.map +1 -0
  245. package/lib/types/account/ClientCredentials.d.ts +20 -0
  246. package/lib/types/account/ClientCredentials.d.ts.map +1 -0
  247. package/lib/types/account/ClientInfo.d.ts +19 -0
  248. package/lib/types/account/ClientInfo.d.ts.map +1 -0
  249. package/lib/types/account/TokenClaims.d.ts +84 -0
  250. package/lib/types/account/TokenClaims.d.ts.map +1 -0
  251. package/lib/types/authority/Authority.d.ts +255 -0
  252. package/lib/types/authority/Authority.d.ts.map +1 -0
  253. package/lib/types/authority/AuthorityFactory.d.ts +19 -0
  254. package/lib/types/authority/AuthorityFactory.d.ts.map +1 -0
  255. package/lib/types/authority/AuthorityMetadata.d.ts +44 -0
  256. package/lib/types/authority/AuthorityMetadata.d.ts.map +1 -0
  257. package/lib/types/authority/AuthorityOptions.d.ts +28 -0
  258. package/lib/types/authority/AuthorityOptions.d.ts.map +1 -0
  259. package/lib/types/authority/AuthorityType.d.ts +11 -0
  260. package/lib/types/authority/AuthorityType.d.ts.map +1 -0
  261. package/lib/types/authority/AzureRegion.d.ts +2 -0
  262. package/lib/types/authority/AzureRegion.d.ts.map +1 -0
  263. package/lib/types/authority/AzureRegionConfiguration.d.ts +6 -0
  264. package/lib/types/authority/AzureRegionConfiguration.d.ts.map +1 -0
  265. package/lib/types/authority/CloudDiscoveryMetadata.d.ts +6 -0
  266. package/lib/types/authority/CloudDiscoveryMetadata.d.ts.map +1 -0
  267. package/lib/types/authority/CloudInstanceDiscoveryErrorResponse.d.ts +14 -0
  268. package/lib/types/authority/CloudInstanceDiscoveryErrorResponse.d.ts.map +1 -0
  269. package/lib/types/authority/CloudInstanceDiscoveryResponse.d.ts +10 -0
  270. package/lib/types/authority/CloudInstanceDiscoveryResponse.d.ts.map +1 -0
  271. package/lib/types/authority/ImdsOptions.d.ts +6 -0
  272. package/lib/types/authority/ImdsOptions.d.ts.map +1 -0
  273. package/lib/types/authority/OIDCOptions.d.ts +9 -0
  274. package/lib/types/authority/OIDCOptions.d.ts.map +1 -0
  275. package/lib/types/authority/OpenIdConfigResponse.d.ts +12 -0
  276. package/lib/types/authority/OpenIdConfigResponse.d.ts.map +1 -0
  277. package/lib/types/authority/ProtocolMode.d.ts +9 -0
  278. package/lib/types/authority/ProtocolMode.d.ts.map +1 -0
  279. package/lib/types/authority/RegionDiscovery.d.ts +33 -0
  280. package/lib/types/authority/RegionDiscovery.d.ts.map +1 -0
  281. package/lib/types/authority/RegionDiscoveryMetadata.d.ts +7 -0
  282. package/lib/types/authority/RegionDiscoveryMetadata.d.ts.map +1 -0
  283. package/lib/types/broker/nativeBroker/INativeBrokerPlugin.d.ts +16 -0
  284. package/lib/types/broker/nativeBroker/INativeBrokerPlugin.d.ts.map +1 -0
  285. package/lib/types/cache/CacheManager.d.ts +498 -0
  286. package/lib/types/cache/CacheManager.d.ts.map +1 -0
  287. package/lib/types/cache/entities/AccessTokenEntity.d.ts +26 -0
  288. package/lib/types/cache/entities/AccessTokenEntity.d.ts.map +1 -0
  289. package/lib/types/cache/entities/AccountEntity.d.ts +107 -0
  290. package/lib/types/cache/entities/AccountEntity.d.ts.map +1 -0
  291. package/lib/types/cache/entities/AppMetadataEntity.d.ts +12 -0
  292. package/lib/types/cache/entities/AppMetadataEntity.d.ts.map +1 -0
  293. package/lib/types/cache/entities/AuthorityMetadataEntity.d.ts +16 -0
  294. package/lib/types/cache/entities/AuthorityMetadataEntity.d.ts.map +1 -0
  295. package/lib/types/cache/entities/CacheRecord.d.ts +14 -0
  296. package/lib/types/cache/entities/CacheRecord.d.ts.map +1 -0
  297. package/lib/types/cache/entities/CredentialEntity.d.ts +31 -0
  298. package/lib/types/cache/entities/CredentialEntity.d.ts.map +1 -0
  299. package/lib/types/cache/entities/IdTokenEntity.d.ts +9 -0
  300. package/lib/types/cache/entities/IdTokenEntity.d.ts.map +1 -0
  301. package/lib/types/cache/entities/RefreshTokenEntity.d.ts +8 -0
  302. package/lib/types/cache/entities/RefreshTokenEntity.d.ts.map +1 -0
  303. package/lib/types/cache/entities/ServerTelemetryEntity.d.ts +7 -0
  304. package/lib/types/cache/entities/ServerTelemetryEntity.d.ts.map +1 -0
  305. package/lib/types/cache/entities/ThrottlingEntity.d.ts +8 -0
  306. package/lib/types/cache/entities/ThrottlingEntity.d.ts.map +1 -0
  307. package/lib/types/cache/interface/ICacheManager.d.ts +167 -0
  308. package/lib/types/cache/interface/ICacheManager.d.ts.map +1 -0
  309. package/lib/types/cache/interface/ICachePlugin.d.ts +6 -0
  310. package/lib/types/cache/interface/ICachePlugin.d.ts.map +1 -0
  311. package/lib/types/cache/interface/ISerializableTokenCache.d.ts +5 -0
  312. package/lib/types/cache/interface/ISerializableTokenCache.d.ts.map +1 -0
  313. package/lib/types/cache/persistence/TokenCacheContext.d.ts +24 -0
  314. package/lib/types/cache/persistence/TokenCacheContext.d.ts.map +1 -0
  315. package/lib/types/cache/utils/CacheHelpers.d.ts +95 -0
  316. package/lib/types/cache/utils/CacheHelpers.d.ts.map +1 -0
  317. package/lib/types/cache/utils/CacheTypes.d.ts +70 -0
  318. package/lib/types/cache/utils/CacheTypes.d.ts.map +1 -0
  319. package/lib/types/client/AuthorizationCodeClient.d.ts +76 -0
  320. package/lib/types/client/AuthorizationCodeClient.d.ts.map +1 -0
  321. package/lib/types/client/BaseClient.d.ts +52 -0
  322. package/lib/types/client/BaseClient.d.ts.map +1 -0
  323. package/lib/types/client/RefreshTokenClient.d.ts +36 -0
  324. package/lib/types/client/RefreshTokenClient.d.ts.map +1 -0
  325. package/lib/types/client/SilentFlowClient.d.ts +28 -0
  326. package/lib/types/client/SilentFlowClient.d.ts.map +1 -0
  327. package/lib/types/config/AppTokenProvider.d.ts +39 -0
  328. package/lib/types/config/AppTokenProvider.d.ts.map +1 -0
  329. package/lib/types/config/ClientConfiguration.d.ts +153 -0
  330. package/lib/types/config/ClientConfiguration.d.ts.map +1 -0
  331. package/lib/types/constants/AADServerParamKeys.d.ts +54 -0
  332. package/lib/types/constants/AADServerParamKeys.d.ts.map +1 -0
  333. package/lib/types/crypto/ICrypto.d.ts +69 -0
  334. package/lib/types/crypto/ICrypto.d.ts.map +1 -0
  335. package/lib/types/crypto/IGuidGenerator.d.ts +5 -0
  336. package/lib/types/crypto/IGuidGenerator.d.ts.map +1 -0
  337. package/lib/types/crypto/JoseHeader.d.ts +23 -0
  338. package/lib/types/crypto/JoseHeader.d.ts.map +1 -0
  339. package/lib/types/crypto/PopTokenGenerator.d.ts +60 -0
  340. package/lib/types/crypto/PopTokenGenerator.d.ts.map +1 -0
  341. package/lib/types/crypto/SignedHttpRequest.d.ts +16 -0
  342. package/lib/types/crypto/SignedHttpRequest.d.ts.map +1 -0
  343. package/lib/types/error/AuthError.d.ts +45 -0
  344. package/lib/types/error/AuthError.d.ts.map +1 -0
  345. package/lib/types/error/AuthErrorCodes.d.ts +6 -0
  346. package/lib/types/error/AuthErrorCodes.d.ts.map +1 -0
  347. package/lib/types/error/CacheError.d.ts +21 -0
  348. package/lib/types/error/CacheError.d.ts.map +1 -0
  349. package/lib/types/error/CacheErrorCodes.d.ts +3 -0
  350. package/lib/types/error/CacheErrorCodes.d.ts.map +1 -0
  351. package/lib/types/error/ClientAuthError.d.ts +238 -0
  352. package/lib/types/error/ClientAuthError.d.ts.map +1 -0
  353. package/lib/types/error/ClientAuthErrorCodes.d.ts +45 -0
  354. package/lib/types/error/ClientAuthErrorCodes.d.ts.map +1 -0
  355. package/lib/types/error/ClientConfigurationError.d.ts +129 -0
  356. package/lib/types/error/ClientConfigurationError.d.ts.map +1 -0
  357. package/lib/types/error/ClientConfigurationErrorCodes.d.ts +23 -0
  358. package/lib/types/error/ClientConfigurationErrorCodes.d.ts.map +1 -0
  359. package/lib/types/error/InteractionRequiredAuthError.d.ts +66 -0
  360. package/lib/types/error/InteractionRequiredAuthError.d.ts.map +1 -0
  361. package/lib/types/error/InteractionRequiredAuthErrorCodes.d.ts +8 -0
  362. package/lib/types/error/InteractionRequiredAuthErrorCodes.d.ts.map +1 -0
  363. package/lib/types/error/JoseHeaderError.d.ts +16 -0
  364. package/lib/types/error/JoseHeaderError.d.ts.map +1 -0
  365. package/lib/types/error/JoseHeaderErrorCodes.d.ts +3 -0
  366. package/lib/types/error/JoseHeaderErrorCodes.d.ts.map +1 -0
  367. package/lib/types/error/ServerError.d.ts +16 -0
  368. package/lib/types/error/ServerError.d.ts.map +1 -0
  369. package/lib/types/exports-browser-only.d.ts +10 -0
  370. package/lib/types/exports-browser-only.d.ts.map +1 -0
  371. package/lib/types/exports-common.d.ts +80 -0
  372. package/lib/types/exports-common.d.ts.map +1 -0
  373. package/lib/types/exports-node-only.d.ts +18 -0
  374. package/lib/types/exports-node-only.d.ts.map +1 -0
  375. package/lib/types/index-browser.d.ts +7 -0
  376. package/lib/types/index-browser.d.ts.map +1 -0
  377. package/lib/types/index-node.d.ts +7 -0
  378. package/lib/types/index-node.d.ts.map +1 -0
  379. package/lib/types/index.d.ts +12 -0
  380. package/lib/types/index.d.ts.map +1 -0
  381. package/lib/types/logger/Logger.d.ts +96 -0
  382. package/lib/types/logger/Logger.d.ts.map +1 -0
  383. package/lib/types/network/INetworkModule.d.ts +30 -0
  384. package/lib/types/network/INetworkModule.d.ts.map +1 -0
  385. package/lib/types/network/NetworkManager.d.ts +34 -0
  386. package/lib/types/network/NetworkManager.d.ts.map +1 -0
  387. package/lib/types/network/RequestThumbprint.d.ts +19 -0
  388. package/lib/types/network/RequestThumbprint.d.ts.map +1 -0
  389. package/lib/types/network/ThrottlingUtils.d.ts +43 -0
  390. package/lib/types/network/ThrottlingUtils.d.ts.map +1 -0
  391. package/lib/types/packageMetadata.d.ts +3 -0
  392. package/lib/types/packageMetadata.d.ts.map +1 -0
  393. package/lib/types/request/AuthenticationHeaderParser.d.ts +20 -0
  394. package/lib/types/request/AuthenticationHeaderParser.d.ts.map +1 -0
  395. package/lib/types/request/BaseAuthRequest.d.ts +48 -0
  396. package/lib/types/request/BaseAuthRequest.d.ts.map +1 -0
  397. package/lib/types/request/CommonAuthorizationCodeRequest.d.ts +28 -0
  398. package/lib/types/request/CommonAuthorizationCodeRequest.d.ts.map +1 -0
  399. package/lib/types/request/CommonAuthorizationUrlRequest.d.ts +51 -0
  400. package/lib/types/request/CommonAuthorizationUrlRequest.d.ts.map +1 -0
  401. package/lib/types/request/CommonClientCredentialRequest.d.ts +18 -0
  402. package/lib/types/request/CommonClientCredentialRequest.d.ts.map +1 -0
  403. package/lib/types/request/CommonDeviceCodeRequest.d.ts +22 -0
  404. package/lib/types/request/CommonDeviceCodeRequest.d.ts.map +1 -0
  405. package/lib/types/request/CommonEndSessionRequest.d.ts +22 -0
  406. package/lib/types/request/CommonEndSessionRequest.d.ts.map +1 -0
  407. package/lib/types/request/CommonOnBehalfOfRequest.d.ts +14 -0
  408. package/lib/types/request/CommonOnBehalfOfRequest.d.ts.map +1 -0
  409. package/lib/types/request/CommonRefreshTokenRequest.d.ts +23 -0
  410. package/lib/types/request/CommonRefreshTokenRequest.d.ts.map +1 -0
  411. package/lib/types/request/CommonSilentFlowRequest.d.ts +28 -0
  412. package/lib/types/request/CommonSilentFlowRequest.d.ts.map +1 -0
  413. package/lib/types/request/CommonUsernamePasswordRequest.d.ts +18 -0
  414. package/lib/types/request/CommonUsernamePasswordRequest.d.ts.map +1 -0
  415. package/lib/types/request/NativeRequest.d.ts +20 -0
  416. package/lib/types/request/NativeRequest.d.ts.map +1 -0
  417. package/lib/types/request/NativeSignOutRequest.d.ts +6 -0
  418. package/lib/types/request/NativeSignOutRequest.d.ts.map +1 -0
  419. package/lib/types/request/RequestParameterBuilder.d.ts +218 -0
  420. package/lib/types/request/RequestParameterBuilder.d.ts.map +1 -0
  421. package/lib/types/request/RequestValidator.d.ts +28 -0
  422. package/lib/types/request/RequestValidator.d.ts.map +1 -0
  423. package/lib/types/request/ScopeSet.d.ts +89 -0
  424. package/lib/types/request/ScopeSet.d.ts.map +1 -0
  425. package/lib/types/request/StoreInCache.d.ts +9 -0
  426. package/lib/types/request/StoreInCache.d.ts.map +1 -0
  427. package/lib/types/response/AuthenticationResult.d.ts +42 -0
  428. package/lib/types/response/AuthenticationResult.d.ts.map +1 -0
  429. package/lib/types/response/AuthorizationCodePayload.d.ts +14 -0
  430. package/lib/types/response/AuthorizationCodePayload.d.ts.map +1 -0
  431. package/lib/types/response/DeviceCodeResponse.d.ts +26 -0
  432. package/lib/types/response/DeviceCodeResponse.d.ts.map +1 -0
  433. package/lib/types/response/ExternalTokenResponse.d.ts +16 -0
  434. package/lib/types/response/ExternalTokenResponse.d.ts.map +1 -0
  435. package/lib/types/response/IMDSBadResponse.d.ts +5 -0
  436. package/lib/types/response/IMDSBadResponse.d.ts.map +1 -0
  437. package/lib/types/response/ResponseHandler.d.ts +70 -0
  438. package/lib/types/response/ResponseHandler.d.ts.map +1 -0
  439. package/lib/types/response/ServerAuthorizationCodeResponse.d.ts +27 -0
  440. package/lib/types/response/ServerAuthorizationCodeResponse.d.ts.map +1 -0
  441. package/lib/types/response/ServerAuthorizationTokenResponse.d.ts +48 -0
  442. package/lib/types/response/ServerAuthorizationTokenResponse.d.ts.map +1 -0
  443. package/lib/types/telemetry/performance/IPerformanceClient.d.ts +58 -0
  444. package/lib/types/telemetry/performance/IPerformanceClient.d.ts.map +1 -0
  445. package/lib/types/telemetry/performance/IPerformanceMeasurement.d.ts +6 -0
  446. package/lib/types/telemetry/performance/IPerformanceMeasurement.d.ts.map +1 -0
  447. package/lib/types/telemetry/performance/PerformanceClient.d.ts +243 -0
  448. package/lib/types/telemetry/performance/PerformanceClient.d.ts.map +1 -0
  449. package/lib/types/telemetry/performance/PerformanceEvent.d.ts +512 -0
  450. package/lib/types/telemetry/performance/PerformanceEvent.d.ts.map +1 -0
  451. package/lib/types/telemetry/performance/StubPerformanceClient.d.ts +25 -0
  452. package/lib/types/telemetry/performance/StubPerformanceClient.d.ts.map +1 -0
  453. package/lib/types/telemetry/server/ServerTelemetryManager.d.ts +79 -0
  454. package/lib/types/telemetry/server/ServerTelemetryManager.d.ts.map +1 -0
  455. package/lib/types/telemetry/server/ServerTelemetryRequest.d.ts +9 -0
  456. package/lib/types/telemetry/server/ServerTelemetryRequest.d.ts.map +1 -0
  457. package/lib/types/url/IUri.d.ts +13 -0
  458. package/lib/types/url/IUri.d.ts.map +1 -0
  459. package/lib/types/url/UrlString.d.ts +49 -0
  460. package/lib/types/url/UrlString.d.ts.map +1 -0
  461. package/lib/types/utils/ClientAssertionUtils.d.ts +3 -0
  462. package/lib/types/utils/ClientAssertionUtils.d.ts.map +1 -0
  463. package/lib/types/utils/Constants.d.ts +310 -0
  464. package/lib/types/utils/Constants.d.ts.map +1 -0
  465. package/lib/types/utils/FunctionWrappers.d.ts +28 -0
  466. package/lib/types/utils/FunctionWrappers.d.ts.map +1 -0
  467. package/lib/types/utils/MsalTypes.d.ts +7 -0
  468. package/lib/types/utils/MsalTypes.d.ts.map +1 -0
  469. package/lib/types/utils/ProtocolUtils.d.ts +43 -0
  470. package/lib/types/utils/ProtocolUtils.d.ts.map +1 -0
  471. package/lib/types/utils/StringUtils.d.ts +41 -0
  472. package/lib/types/utils/StringUtils.d.ts.map +1 -0
  473. package/lib/types/utils/TimeUtils.d.ts +26 -0
  474. package/lib/types/utils/TimeUtils.d.ts.map +1 -0
  475. package/lib/types/utils/UrlUtils.d.ts +11 -0
  476. package/lib/types/utils/UrlUtils.d.ts.map +1 -0
  477. package/node/README.md +1 -0
  478. package/node/package.json +5 -0
  479. package/package.json +37 -8
  480. package/src/account/AccountInfo.ts +1 -1
  481. package/src/account/AuthToken.ts +2 -2
  482. package/src/account/ClientInfo.ts +2 -2
  483. package/src/authority/Authority.ts +26 -26
  484. package/src/authority/AuthorityFactory.ts +9 -9
  485. package/src/authority/AuthorityMetadata.ts +7 -7
  486. package/src/authority/AuthorityOptions.ts +4 -4
  487. package/src/authority/AzureRegionConfiguration.ts +1 -1
  488. package/src/authority/CloudInstanceDiscoveryResponse.ts +1 -1
  489. package/src/authority/OIDCOptions.ts +1 -1
  490. package/src/authority/RegionDiscovery.ts +10 -10
  491. package/src/authority/RegionDiscoveryMetadata.ts +1 -1
  492. package/src/broker/nativeBroker/INativeBrokerPlugin.ts +5 -5
  493. package/src/cache/CacheManager.ts +28 -28
  494. package/src/cache/entities/AccessTokenEntity.ts +2 -2
  495. package/src/cache/entities/AccountEntity.ts +10 -10
  496. package/src/cache/entities/CacheRecord.ts +5 -5
  497. package/src/cache/entities/CredentialEntity.ts +1 -1
  498. package/src/cache/entities/IdTokenEntity.ts +1 -1
  499. package/src/cache/entities/RefreshTokenEntity.ts +1 -1
  500. package/src/cache/interface/ICacheManager.ts +12 -12
  501. package/src/cache/interface/ICachePlugin.ts +1 -1
  502. package/src/cache/persistence/TokenCacheContext.ts +1 -1
  503. package/src/cache/utils/CacheHelpers.ts +13 -13
  504. package/src/cache/utils/CacheTypes.ts +11 -11
  505. package/src/client/AuthorizationCodeClient.ts +51 -38
  506. package/src/client/BaseClient.ts +19 -19
  507. package/src/client/RefreshTokenClient.ts +29 -29
  508. package/src/client/SilentFlowClient.ts +17 -17
  509. package/src/config/ClientConfiguration.ts +18 -15
  510. package/src/crypto/ICrypto.ts +3 -3
  511. package/src/crypto/JoseHeader.ts +2 -2
  512. package/src/crypto/PopTokenGenerator.ts +7 -7
  513. package/src/crypto/SignedHttpRequest.ts +1 -1
  514. package/src/error/AuthError.ts +2 -2
  515. package/src/error/CacheError.ts +1 -1
  516. package/src/error/ClientAuthError.ts +2 -2
  517. package/src/error/ClientConfigurationError.ts +2 -2
  518. package/src/error/InteractionRequiredAuthError.ts +3 -3
  519. package/src/error/JoseHeaderError.ts +2 -2
  520. package/src/error/ServerError.ts +1 -1
  521. package/src/exports-browser-only.ts +29 -0
  522. package/src/exports-common.ts +192 -0
  523. package/src/exports-node-only.ts +35 -0
  524. package/src/index-browser.ts +11 -0
  525. package/src/index-node.ts +11 -0
  526. package/src/index.ts +7 -250
  527. package/src/logger/Logger.ts +2 -2
  528. package/src/network/INetworkModule.ts +2 -2
  529. package/src/network/NetworkManager.ts +7 -7
  530. package/src/network/RequestThumbprint.ts +2 -2
  531. package/src/network/ThrottlingUtils.ts +8 -8
  532. package/src/packageMetadata.ts +1 -1
  533. package/src/request/AuthenticationHeaderParser.ts +2 -2
  534. package/src/request/BaseAuthRequest.ts +5 -5
  535. package/src/request/CommonAuthorizationCodeRequest.ts +3 -3
  536. package/src/request/CommonAuthorizationUrlRequest.ts +4 -4
  537. package/src/request/CommonClientCredentialRequest.ts +3 -3
  538. package/src/request/CommonDeviceCodeRequest.ts +3 -3
  539. package/src/request/CommonEndSessionRequest.ts +2 -2
  540. package/src/request/CommonOnBehalfOfRequest.ts +1 -1
  541. package/src/request/CommonRefreshTokenRequest.ts +3 -3
  542. package/src/request/CommonSilentFlowRequest.ts +3 -3
  543. package/src/request/CommonUsernamePasswordRequest.ts +1 -1
  544. package/src/request/NativeRequest.ts +1 -1
  545. package/src/request/RequestParameterBuilder.ts +9 -9
  546. package/src/request/RequestValidator.ts +2 -2
  547. package/src/request/ScopeSet.ts +4 -4
  548. package/src/response/AuthenticationResult.ts +1 -1
  549. package/src/response/ExternalTokenResponse.ts +1 -1
  550. package/src/response/ResponseHandler.ts +31 -31
  551. package/src/response/ServerAuthorizationTokenResponse.ts +1 -1
  552. package/src/telemetry/performance/IPerformanceClient.ts +2 -2
  553. package/src/telemetry/performance/PerformanceClient.ts +10 -10
  554. package/src/telemetry/performance/PerformanceEvent.ts +0 -5
  555. package/src/telemetry/performance/StubPerformanceClient.ts +6 -3
  556. package/src/telemetry/server/ServerTelemetryManager.ts +6 -6
  557. package/src/url/UrlString.ts +5 -5
  558. package/src/utils/ClientAssertionUtils.ts +1 -1
  559. package/src/utils/FunctionWrappers.ts +2 -2
  560. package/src/utils/ProtocolUtils.ts +3 -3
  561. package/src/utils/UrlUtils.ts +2 -2
  562. package/dist/index.cjs.map +0 -1
@@ -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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AuthorityMetadataEntity.d.ts","sourceRoot":"","sources":["../../../../src/cache/entities/AuthorityMetadataEntity.ts"],"names":[],"mappings":"AAKA,gBAAgB;AAChB,MAAM,MAAM,uBAAuB,GAAG;IAClC,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,cAAc,EAAE,MAAM,CAAC;IACvB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,kBAAkB,EAAE,OAAO,CAAC;IAC5B,oBAAoB,EAAE,OAAO,CAAC;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CACpB,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { IdTokenEntity } from "./IdTokenEntity.js";
2
+ import { AccessTokenEntity } from "./AccessTokenEntity.js";
3
+ import { RefreshTokenEntity } from "./RefreshTokenEntity.js";
4
+ import { AccountEntity } from "./AccountEntity.js";
5
+ import { AppMetadataEntity } from "./AppMetadataEntity.js";
6
+ /** @internal */
7
+ export type CacheRecord = {
8
+ account?: AccountEntity | null;
9
+ idToken?: IdTokenEntity | null;
10
+ accessToken?: AccessTokenEntity | null;
11
+ refreshToken?: RefreshTokenEntity | null;
12
+ appMetadata?: AppMetadataEntity | null;
13
+ };
14
+ //# sourceMappingURL=CacheRecord.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CacheRecord.d.ts","sourceRoot":"","sources":["../../../../src/cache/entities/CacheRecord.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,gBAAgB;AAChB,MAAM,MAAM,WAAW,GAAG;IACtB,OAAO,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;IAC/B,OAAO,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;IAC/B,WAAW,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAC;IACvC,YAAY,CAAC,EAAE,kBAAkB,GAAG,IAAI,CAAC;IACzC,WAAW,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAC;CAC1C,CAAC"}
@@ -0,0 +1,31 @@
1
+ import { CredentialType, AuthenticationScheme } from "../../utils/Constants.js";
2
+ /**
3
+ * Credential Cache Type
4
+ */
5
+ export type CredentialEntity = {
6
+ /** Identifier for the user in their home tenant*/
7
+ homeAccountId: string;
8
+ /** Entity that issued the token, represented as a full host */
9
+ environment: string;
10
+ /** Type of credential */
11
+ credentialType: CredentialType;
12
+ /** Client ID of the application */
13
+ clientId: string;
14
+ /** Actual credential as a string */
15
+ secret: string;
16
+ /** Family ID identifier, usually only used for refresh tokens */
17
+ familyId?: string;
18
+ /** Full tenant or organizational identifier that the account belongs to */
19
+ realm?: string;
20
+ /** Permissions that are included in the token, or for refresh tokens, the resource identifier. */
21
+ target?: string;
22
+ /** Matches the SHA 256 hash of the obo_assertion for the OBO flow */
23
+ userAssertionHash?: string;
24
+ /** Matches the authentication scheme for which the token was issued (i.e. Bearer or pop) */
25
+ tokenType?: AuthenticationScheme;
26
+ /** KeyId for PoP and SSH tokens stored in the kid claim */
27
+ keyId?: string;
28
+ /** Matches the SHA 256 hash of the claims object included in the token request */
29
+ requestedClaimsHash?: string;
30
+ };
31
+ //# sourceMappingURL=CredentialEntity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CredentialEntity.d.ts","sourceRoot":"","sources":["../../../../src/cache/entities/CredentialEntity.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhF;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC3B,kDAAkD;IAClD,aAAa,EAAE,MAAM,CAAC;IACtB,+DAA+D;IAC/D,WAAW,EAAE,MAAM,CAAC;IACpB,yBAAyB;IACzB,cAAc,EAAE,cAAc,CAAC;IAC/B,mCAAmC;IACnC,QAAQ,EAAE,MAAM,CAAC;IACjB,oCAAoC;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,iEAAiE;IACjE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,2EAA2E;IAC3E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kGAAkG;IAClG,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,qEAAqE;IACrE,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,4FAA4F;IAC5F,SAAS,CAAC,EAAE,oBAAoB,CAAC;IACjC,2DAA2D;IAC3D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kFAAkF;IAClF,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAChC,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { CredentialEntity } from "./CredentialEntity.js";
2
+ /**
3
+ * Id Token Cache Type
4
+ */
5
+ export type IdTokenEntity = CredentialEntity & {
6
+ /** Full tenant or organizational identifier that the account belongs to */
7
+ realm: string;
8
+ };
9
+ //# sourceMappingURL=IdTokenEntity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IdTokenEntity.d.ts","sourceRoot":"","sources":["../../../../src/cache/entities/IdTokenEntity.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,gBAAgB,GAAG;IAC3C,4EAA4E;IAC5E,KAAK,EAAE,MAAM,CAAC;CACjB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { CredentialEntity } from "./CredentialEntity.js";
2
+ /**
3
+ * Refresh Token Cache Type
4
+ */
5
+ export type RefreshTokenEntity = CredentialEntity & {
6
+ expiresOn?: string;
7
+ };
8
+ //# sourceMappingURL=RefreshTokenEntity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RefreshTokenEntity.d.ts","sourceRoot":"","sources":["../../../../src/cache/entities/RefreshTokenEntity.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,gBAAgB,GAAG;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC"}
@@ -0,0 +1,7 @@
1
+ export type ServerTelemetryEntity = {
2
+ failedRequests: Array<string | number>;
3
+ errors: string[];
4
+ cacheHits: number;
5
+ nativeBrokerErrorCode?: string;
6
+ };
7
+ //# sourceMappingURL=ServerTelemetryEntity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ServerTelemetryEntity.d.ts","sourceRoot":"","sources":["../../../../src/cache/entities/ServerTelemetryEntity.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,qBAAqB,GAAG;IAChC,cAAc,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;IACvC,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAClC,CAAC"}
@@ -0,0 +1,8 @@
1
+ export type ThrottlingEntity = {
2
+ throttleTime: number;
3
+ error?: string;
4
+ errorCodes?: Array<string>;
5
+ errorMessage?: string;
6
+ subError?: string;
7
+ };
8
+ //# sourceMappingURL=ThrottlingEntity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ThrottlingEntity.d.ts","sourceRoot":"","sources":["../../../../src/cache/entities/ThrottlingEntity.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,gBAAgB,GAAG;IAE3B,YAAY,EAAE,MAAM,CAAC;IAErB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC"}
@@ -0,0 +1,167 @@
1
+ import { AccountFilter } from "../utils/CacheTypes.js";
2
+ import { CacheRecord } from "../entities/CacheRecord.js";
3
+ import { AccountEntity } from "../entities/AccountEntity.js";
4
+ import { AccountInfo } from "../../account/AccountInfo.js";
5
+ import { AppMetadataEntity } from "../entities/AppMetadataEntity.js";
6
+ import { ServerTelemetryEntity } from "../entities/ServerTelemetryEntity.js";
7
+ import { ThrottlingEntity } from "../entities/ThrottlingEntity.js";
8
+ import { IdTokenEntity } from "../entities/IdTokenEntity.js";
9
+ import { AccessTokenEntity } from "../entities/AccessTokenEntity.js";
10
+ import { RefreshTokenEntity } from "../entities/RefreshTokenEntity.js";
11
+ import { AuthorityMetadataEntity } from "../entities/AuthorityMetadataEntity.js";
12
+ import { StoreInCache } from "../../request/StoreInCache.js";
13
+ export interface ICacheManager {
14
+ /**
15
+ * fetch the account entity from the platform cache
16
+ * @param accountKey
17
+ */
18
+ getAccount(accountKey: string): AccountEntity | null;
19
+ /**
20
+ * set account entity in the platform cache
21
+ * @param account
22
+ */
23
+ setAccount(account: AccountEntity): void;
24
+ /**
25
+ * Returns true if the given key matches our account key schema. Also matches homeAccountId and/or tenantId if provided
26
+ * @param key
27
+ * @param homeAccountId
28
+ * @param tenantId
29
+ * @returns
30
+ */
31
+ isAccountKey(key: string, homeAccountId?: string, tenantId?: string): boolean;
32
+ /**
33
+ * fetch the idToken entity from the platform cache
34
+ * @param idTokenKey
35
+ */
36
+ getIdTokenCredential(idTokenKey: string): IdTokenEntity | null;
37
+ /**
38
+ * set idToken entity to the platform cache
39
+ * @param idToken
40
+ */
41
+ setIdTokenCredential(idToken: IdTokenEntity): void;
42
+ /**
43
+ * fetch the idToken entity from the platform cache
44
+ * @param accessTokenKey
45
+ */
46
+ getAccessTokenCredential(accessTokenKey: string): AccessTokenEntity | null;
47
+ /**
48
+ * set idToken entity to the platform cache
49
+ * @param accessToken
50
+ */
51
+ setAccessTokenCredential(accessToken: AccessTokenEntity): void;
52
+ /**
53
+ * fetch the idToken entity from the platform cache
54
+ * @param refreshTokenKey
55
+ */
56
+ getRefreshTokenCredential(refreshTokenKey: string): RefreshTokenEntity | null;
57
+ /**
58
+ * set idToken entity to the platform cache
59
+ * @param refreshToken
60
+ */
61
+ setRefreshTokenCredential(refreshToken: RefreshTokenEntity): void;
62
+ /**
63
+ * fetch appMetadata entity from the platform cache
64
+ * @param appMetadataKey
65
+ */
66
+ getAppMetadata(appMetadataKey: string): AppMetadataEntity | null;
67
+ /**
68
+ * set appMetadata entity to the platform cache
69
+ * @param appMetadata
70
+ */
71
+ setAppMetadata(appMetadata: AppMetadataEntity): void;
72
+ /**
73
+ * fetch server telemetry entity from the platform cache
74
+ * @param serverTelemetryKey
75
+ */
76
+ getServerTelemetry(serverTelemetryKey: string): ServerTelemetryEntity | null;
77
+ /**
78
+ * set server telemetry entity to the platform cache
79
+ * @param serverTelemetryKey
80
+ * @param serverTelemetry
81
+ */
82
+ setServerTelemetry(serverTelemetryKey: string, serverTelemetry: ServerTelemetryEntity): void;
83
+ /**
84
+ * fetch cloud discovery metadata entity from the platform cache
85
+ * @param key
86
+ */
87
+ getAuthorityMetadata(key: string): AuthorityMetadataEntity | null;
88
+ /**
89
+ * Get cache keys for authority metadata
90
+ */
91
+ getAuthorityMetadataKeys(): Array<string>;
92
+ /**
93
+ * set cloud discovery metadata entity to the platform cache
94
+ * @param key
95
+ * @param value
96
+ */
97
+ setAuthorityMetadata(key: string, value: AuthorityMetadataEntity): void;
98
+ /**
99
+ * Provide an alias to find a matching AuthorityMetadataEntity in cache
100
+ * @param host
101
+ */
102
+ getAuthorityMetadataByAlias(host: string): AuthorityMetadataEntity | null;
103
+ /**
104
+ * given an authority generates the cache key for authorityMetadata
105
+ * @param authority
106
+ */
107
+ generateAuthorityMetadataCacheKey(authority: string): string;
108
+ /**
109
+ * fetch throttling entity from the platform cache
110
+ * @param throttlingCacheKey
111
+ */
112
+ getThrottlingCache(throttlingCacheKey: string): ThrottlingEntity | null;
113
+ /**
114
+ * set throttling entity to the platform cache
115
+ * @param throttlingCacheKey
116
+ * @param throttlingCache
117
+ */
118
+ setThrottlingCache(throttlingCacheKey: string, throttlingCache: ThrottlingEntity): void;
119
+ /**
120
+ * Returns all accounts in cache
121
+ */
122
+ getAllAccounts(): AccountInfo[];
123
+ /**
124
+ * saves a cache record
125
+ * @param cacheRecord
126
+ */
127
+ saveCacheRecord(cacheRecord: CacheRecord, storeInCache?: StoreInCache): Promise<void>;
128
+ /**
129
+ * retrieve accounts matching all provided filters; if no filter is set, get all accounts
130
+ * @param homeAccountId
131
+ * @param environment
132
+ * @param realm
133
+ */
134
+ getAccountsFilteredBy(filter: AccountFilter): AccountEntity[];
135
+ /**
136
+ * Get AccountInfo object based on provided filters
137
+ * @param filter
138
+ */
139
+ getAccountInfoFilteredBy(filter: AccountFilter): AccountInfo | null;
140
+ /**
141
+ * Removes all accounts and related tokens from cache.
142
+ */
143
+ removeAllAccounts(): Promise<void>;
144
+ /**
145
+ * returns a boolean if the given account is removed
146
+ * @param account
147
+ */
148
+ removeAccount(accountKey: string): Promise<void>;
149
+ /**
150
+ * returns a boolean if the given account is removed
151
+ * @param account
152
+ */
153
+ removeAccountContext(account: AccountEntity): Promise<void>;
154
+ /**
155
+ * @param key
156
+ */
157
+ removeIdToken(key: string): void;
158
+ /**
159
+ * @param key
160
+ */
161
+ removeAccessToken(key: string): Promise<void>;
162
+ /**
163
+ * @param key
164
+ */
165
+ removeRefreshToken(key: string): void;
166
+ }
167
+ //# sourceMappingURL=ICacheManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ICacheManager.d.ts","sourceRoot":"","sources":["../../../../src/cache/interface/ICacheManager.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AACjF,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAE7D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AAM,GAAG,IAAI,CAAC;CACzC"}
@@ -0,0 +1,6 @@
1
+ import { TokenCacheContext } from "../persistence/TokenCacheContext.js";
2
+ export interface ICachePlugin {
3
+ beforeCacheAccess: (tokenCacheContext: TokenCacheContext) => Promise<void>;
4
+ afterCacheAccess: (tokenCacheContext: TokenCacheContext) => Promise<void>;
5
+ }
6
+ //# sourceMappingURL=ICachePlugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ICachePlugin.d.ts","sourceRoot":"","sources":["../../../../src/cache/interface/ICachePlugin.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAExE,MAAM,WAAW,YAAY;IACzB,iBAAiB,EAAE,CAAC,iBAAiB,EAAE,iBAAiB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3E,gBAAgB,EAAE,CAAC,iBAAiB,EAAE,iBAAiB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC7E"}
@@ -0,0 +1,5 @@
1
+ export interface ISerializableTokenCache {
2
+ deserialize: (cache: string) => void;
3
+ serialize: () => string;
4
+ }
5
+ //# sourceMappingURL=ISerializableTokenCache.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ISerializableTokenCache.d.ts","sourceRoot":"","sources":["../../../../src/cache/interface/ISerializableTokenCache.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,uBAAuB;IACpC,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,SAAS,EAAE,MAAM,MAAM,CAAC;CAC3B"}
@@ -0,0 +1,24 @@
1
+ import { ISerializableTokenCache } from "../interface/ISerializableTokenCache.js";
2
+ /**
3
+ * This class instance helps track the memory changes facilitating
4
+ * decisions to read from and write to the persistent cache
5
+ */ export declare class TokenCacheContext {
6
+ /**
7
+ * boolean indicating cache change
8
+ */
9
+ hasChanged: boolean;
10
+ /**
11
+ * serializable token cache interface
12
+ */
13
+ cache: ISerializableTokenCache;
14
+ constructor(tokenCache: ISerializableTokenCache, hasChanged: boolean);
15
+ /**
16
+ * boolean which indicates the changes in cache
17
+ */
18
+ get cacheHasChanged(): boolean;
19
+ /**
20
+ * function to retrieve the token cache
21
+ */
22
+ get tokenCache(): ISerializableTokenCache;
23
+ }
24
+ //# sourceMappingURL=TokenCacheContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TokenCacheContext.d.ts","sourceRoot":"","sources":["../../../../src/cache/persistence/TokenCacheContext.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAElF;;;GAGG,CAAC,qBAAa,iBAAiB;IAC9B;;OAEG;IACH,UAAU,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,KAAK,EAAE,uBAAuB,CAAC;gBAEnB,UAAU,EAAE,uBAAuB,EAAE,UAAU,EAAE,OAAO;IAKpE;;OAEG;IACH,IAAI,eAAe,IAAI,OAAO,CAE7B;IAED;;OAEG;IACH,IAAI,UAAU,IAAI,uBAAuB,CAExC;CACJ"}
@@ -0,0 +1,95 @@
1
+ import { CloudDiscoveryMetadata } from "../../authority/CloudDiscoveryMetadata.js";
2
+ import { OpenIdConfigResponse } from "../../authority/OpenIdConfigResponse.js";
3
+ import { AuthenticationScheme } from "../../utils/Constants.js";
4
+ import { AccessTokenEntity } from "../entities/AccessTokenEntity.js";
5
+ import { AppMetadataEntity } from "../entities/AppMetadataEntity.js";
6
+ import { AuthorityMetadataEntity } from "../entities/AuthorityMetadataEntity.js";
7
+ import { CredentialEntity } from "../entities/CredentialEntity.js";
8
+ import { IdTokenEntity } from "../entities/IdTokenEntity.js";
9
+ import { RefreshTokenEntity } from "../entities/RefreshTokenEntity.js";
10
+ /**
11
+ * Cache Key: <home_account_id>-<environment>-<credential_type>-<client_id or familyId>-<realm>-<scopes>-<claims hash>-<scheme>
12
+ * IdToken Example: uid.utid-login.microsoftonline.com-idtoken-app_client_id-contoso.com
13
+ * AccessToken Example: uid.utid-login.microsoftonline.com-accesstoken-app_client_id-contoso.com-scope1 scope2--pop
14
+ * RefreshToken Example: uid.utid-login.microsoftonline.com-refreshtoken-1-contoso.com
15
+ * @param credentialEntity
16
+ * @returns
17
+ */
18
+ export declare function generateCredentialKey(credentialEntity: CredentialEntity): string;
19
+ /**
20
+ * Create IdTokenEntity
21
+ * @param homeAccountId
22
+ * @param authenticationResult
23
+ * @param clientId
24
+ * @param authority
25
+ */
26
+ export declare function createIdTokenEntity(homeAccountId: string, environment: string, idToken: string, clientId: string, tenantId: string): IdTokenEntity;
27
+ /**
28
+ * Create AccessTokenEntity
29
+ * @param homeAccountId
30
+ * @param environment
31
+ * @param accessToken
32
+ * @param clientId
33
+ * @param tenantId
34
+ * @param scopes
35
+ * @param expiresOn
36
+ * @param extExpiresOn
37
+ */
38
+ export declare function createAccessTokenEntity(homeAccountId: string, environment: string, accessToken: string, clientId: string, tenantId: string, scopes: string, expiresOn: number, extExpiresOn: number, base64Decode: (input: string) => string, refreshOn?: number, tokenType?: AuthenticationScheme, userAssertionHash?: string, keyId?: string, requestedClaims?: string, requestedClaimsHash?: string): AccessTokenEntity;
39
+ /**
40
+ * Create RefreshTokenEntity
41
+ * @param homeAccountId
42
+ * @param authenticationResult
43
+ * @param clientId
44
+ * @param authority
45
+ */
46
+ export declare function createRefreshTokenEntity(homeAccountId: string, environment: string, refreshToken: string, clientId: string, familyId?: string, userAssertionHash?: string, expiresOn?: number): RefreshTokenEntity;
47
+ export declare function isCredentialEntity(entity: object): boolean;
48
+ /**
49
+ * Validates an entity: checks for all expected params
50
+ * @param entity
51
+ */
52
+ export declare function isAccessTokenEntity(entity: object): boolean;
53
+ /**
54
+ * Validates an entity: checks for all expected params
55
+ * @param entity
56
+ */
57
+ export declare function isIdTokenEntity(entity: object): boolean;
58
+ /**
59
+ * Validates an entity: checks for all expected params
60
+ * @param entity
61
+ */
62
+ export declare function isRefreshTokenEntity(entity: object): boolean;
63
+ /**
64
+ * validates if a given cache entry is "Telemetry", parses <key,value>
65
+ * @param key
66
+ * @param entity
67
+ */
68
+ export declare function isServerTelemetryEntity(key: string, entity?: object): boolean;
69
+ /**
70
+ * validates if a given cache entry is "Throttling", parses <key,value>
71
+ * @param key
72
+ * @param entity
73
+ */
74
+ export declare function isThrottlingEntity(key: string, entity?: object): boolean;
75
+ /**
76
+ * Generate AppMetadata Cache Key as per the schema: appmetadata-<environment>-<client_id>
77
+ */
78
+ export declare function generateAppMetadataKey({ environment, clientId, }: AppMetadataEntity): string;
79
+ export declare function isAppMetadataEntity(key: string, entity: object): boolean;
80
+ /**
81
+ * Validates an entity: checks for all expected params
82
+ * @param entity
83
+ */
84
+ export declare function isAuthorityMetadataEntity(key: string, entity: object): boolean;
85
+ /**
86
+ * Reset the exiresAt value
87
+ */
88
+ export declare function generateAuthorityMetadataExpiresAt(): number;
89
+ export declare function updateAuthorityEndpointMetadata(authorityMetadata: AuthorityMetadataEntity, updatedValues: OpenIdConfigResponse, fromNetwork: boolean): void;
90
+ export declare function updateCloudDiscoveryMetadata(authorityMetadata: AuthorityMetadataEntity, updatedValues: CloudDiscoveryMetadata, fromNetwork: boolean): void;
91
+ /**
92
+ * Returns whether or not the data needs to be refreshed
93
+ */
94
+ export declare function isAuthorityMetadataExpired(metadata: AuthorityMetadataEntity): boolean;
95
+ //# sourceMappingURL=CacheHelpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CacheHelpers.d.ts","sourceRoot":"","sources":["../../../../src/cache/utils/CacheHelpers.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,sBAAsB,EAAE,MAAM,2CAA2C,CAAC;AACnF,OAAO,EAAE,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AAK/E,OAAO,EAGH,oBAAoB,EAKvB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CA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../entities/AccountEntity.js";
2
+ import { IdTokenEntity } from "../entities/IdTokenEntity.js";
3
+ import { AccessTokenEntity } from "../entities/AccessTokenEntity.js";
4
+ import { RefreshTokenEntity } from "../entities/RefreshTokenEntity.js";
5
+ import { AppMetadataEntity } from "../entities/AppMetadataEntity.js";
6
+ import { ServerTelemetryEntity } from "../entities/ServerTelemetryEntity.js";
7
+ import { ThrottlingEntity } from "../entities/ThrottlingEntity.js";
8
+ import { AuthorityMetadataEntity } from "../entities/AuthorityMetadataEntity.js";
9
+ import { AuthenticationScheme } from "../../utils/Constants.js";
10
+ import { ScopeSet } from "../../request/ScopeSet.js";
11
+ import { AccountInfo } from "../../account/AccountInfo.js";
12
+ /** @internal */
13
+ export type AccountCache = Record<string, AccountEntity>;
14
+ /** @internal */
15
+ export type IdTokenCache = Record<string, IdTokenEntity>;
16
+ /** @internal */
17
+ export type AccessTokenCache = Record<string, AccessTokenEntity>;
18
+ /** @internal */
19
+ export type RefreshTokenCache = Record<string, RefreshTokenEntity>;
20
+ /** @internal */
21
+ export type AppMetadataCache = Record<string, AppMetadataEntity>;
22
+ /**
23
+ * Object type of all accepted cache types
24
+ * @internal
25
+ */
26
+ export type ValidCacheType = AccountEntity | IdTokenEntity | AccessTokenEntity | RefreshTokenEntity | AppMetadataEntity | AuthorityMetadataEntity | ServerTelemetryEntity | ThrottlingEntity | string;
27
+ /**
28
+ * Object type of all credential types
29
+ * @internal
30
+ */
31
+ export type ValidCredentialType = IdTokenEntity | AccessTokenEntity | RefreshTokenEntity;
32
+ /**
33
+ * Account: <home_account_id>-<environment>-<realm*>
34
+ */
35
+ export type AccountFilter = Omit<Partial<AccountInfo>, "idToken" | "idTokenClaims"> & {
36
+ realm?: string;
37
+ loginHint?: string;
38
+ sid?: string;
39
+ isHomeTenant?: boolean;
40
+ };
41
+ export type TenantProfileFilter = Pick<AccountFilter, "localAccountId" | "loginHint" | "name" | "sid" | "isHomeTenant" | "username">;
42
+ /**
43
+ * Credential: <home_account_id*>-<environment>-<credential_type>-<client_id>-<realm*>-<target*>-<scheme*>
44
+ */
45
+ export type CredentialFilter = {
46
+ homeAccountId?: string;
47
+ environment?: string;
48
+ credentialType?: string;
49
+ clientId?: string;
50
+ familyId?: string;
51
+ realm?: string;
52
+ target?: ScopeSet;
53
+ userAssertionHash?: string;
54
+ tokenType?: AuthenticationScheme;
55
+ keyId?: string;
56
+ requestedClaimsHash?: string;
57
+ };
58
+ /**
59
+ * AppMetadata: appmetadata-<environment>-<client_id>
60
+ */
61
+ export type AppMetadataFilter = {
62
+ environment?: string;
63
+ clientId?: string;
64
+ };
65
+ export type TokenKeys = {
66
+ idToken: string[];
67
+ accessToken: string[];
68
+ refreshToken: string[];
69
+ };
70
+ //# sourceMappingURL=CacheTypes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CacheTypes.d.ts","sourceRoot":"","sources":["../../../../src/cache/utils/CacheTypes.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AACjF,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAE3D,gBAAgB;AAChB,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,a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,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,QAAQ,CAAC;IAClB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAE,oBAAoB,CAAC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAChC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACpB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,YAAY,EAAE,MAAM,EAAE,CAAC;CAC1B,CAAC"}
@@ -0,0 +1,76 @@
1
+ import { BaseClient } from "./BaseClient.js";
2
+ import { CommonAuthorizationUrlRequest } from "../request/CommonAuthorizationUrlRequest.js";
3
+ import { CommonAuthorizationCodeRequest } from "../request/CommonAuthorizationCodeRequest.js";
4
+ import { ClientConfiguration } from "../config/ClientConfiguration.js";
5
+ import { AuthenticationResult } from "../response/AuthenticationResult.js";
6
+ import { ServerAuthorizationCodeResponse } from "../response/ServerAuthorizationCodeResponse.js";
7
+ import { CommonEndSessionRequest } from "../request/CommonEndSessionRequest.js";
8
+ import { AuthorizationCodePayload } from "../response/AuthorizationCodePayload.js";
9
+ import { IPerformanceClient } from "../telemetry/performance/IPerformanceClient.js";
10
+ /**
11
+ * Oauth2.0 Authorization Code client
12
+ * @internal
13
+ */
14
+ export declare class AuthorizationCodeClient extends BaseClient {
15
+ protected includeRedirectUri: boolean;
16
+ private oidcDefaultScopes;
17
+ constructor(configuration: ClientConfiguration, performanceClient?: IPerformanceClient);
18
+ /**
19
+ * Creates the URL of the authorization request letting the user input credentials and consent to the
20
+ * application. The URL target the /authorize endpoint of the authority configured in the
21
+ * application object.
22
+ *
23
+ * Once the user inputs their credentials and consents, the authority will send a response to the redirect URI
24
+ * sent in the request and should contain an authorization code, which can then be used to acquire tokens via
25
+ * acquireToken(AuthorizationCodeRequest)
26
+ * @param request
27
+ */
28
+ getAuthCodeUrl(request: CommonAuthorizationUrlRequest): Promise<string>;
29
+ /**
30
+ * API to acquire a token in exchange of 'authorization_code` acquired by the user in the first leg of the
31
+ * authorization_code_grant
32
+ * @param request
33
+ */
34
+ acquireToken(request: CommonAuthorizationCodeRequest, authCodePayload?: AuthorizationCodePayload): Promise<AuthenticationResult>;
35
+ /**
36
+ * Handles the hash fragment response from public client code request. Returns a code response used by
37
+ * the client to exchange for a token in acquireToken.
38
+ * @param hashFragment
39
+ */
40
+ handleFragmentResponse(serverParams: ServerAuthorizationCodeResponse, cachedState: string): AuthorizationCodePayload;
41
+ /**
42
+ * Used to log out the current user, and redirect the user to the postLogoutRedirectUri.
43
+ * Default behaviour is to redirect the user to `window.location.href`.
44
+ * @param authorityUri
45
+ */
46
+ getLogoutUri(logoutRequest: CommonEndSessionRequest): string;
47
+ /**
48
+ * Executes POST request to token endpoint
49
+ * @param authority
50
+ * @param request
51
+ */
52
+ private executeTokenRequest;
53
+ /**
54
+ * Generates a map for all the params to be sent to the service
55
+ * @param request
56
+ */
57
+ private createTokenRequestBody;
58
+ /**
59
+ * This API validates the `AuthorizationCodeUrlRequest` and creates a URL
60
+ * @param request
61
+ */
62
+ private createAuthCodeUrlQueryString;
63
+ /**
64
+ * This API validates the `EndSessionRequest` and creates a URL
65
+ * @param request
66
+ */
67
+ private createLogoutUrlQueryString;
68
+ private addExtraQueryParams;
69
+ /**
70
+ * Helper to get sid from account. Returns null if idTokenClaims are not present or sid is not present.
71
+ * @param account
72
+ */
73
+ private extractAccountSid;
74
+ private extractLoginHint;
75
+ }
76
+ //# sourceMappingURL=AuthorizationCodeClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AuthorizationCodeClient.d.ts","sourceRoot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